Edit report at https://bugs.php.net/bug.php?id=54255&edit=1

 ID:               54255
 Updated by:       [email protected]
 Reported by:      nm at web dot am
 Summary:          FILTER_VALIDATE_URL does not allow - in domain name
-Status:           Feedback
+Status:           No Feedback
 Type:             Bug
 Package:          Filter related
 Operating System: Linux
 PHP Version:      5.3.5

 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


Previous Comments:
------------------------------------------------------------------------
[2011-03-15 23:06:05] [email protected]

As in try using php.net's sources. Then bogus it again :)

------------------------------------------------------------------------
[2011-03-15 23:05:34] [email protected]

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/



------------------------------------------------------------------------
[2011-03-15 23:00:52] nm at web dot am

What the f...bug!

changed http to hxxp to prevent spam detection :) change back while testing.

Let's compare the results:

Ubuntu 10.10, Linux eniac 2.6.36-020636-generic #201010210905 SMP Thu Oct 21 
09:08:58 UTC 2010 x86_64 GNU/Linux, PHP 5.3.3-1ubuntu9.3 with Suhosin-Patch 
(cli) (built: Jan 12 2011 16:07:38) ,  package: php5 5.3.3-1ubuntu9.3 

works as expected. 
@eniac ~> php -r 'var_dump(filter_var("hxxp://asd_asd.de", 
FILTER_VALIDATE_URL));'
bool(false)
@eniac ~> php -r 'var_dump(filter_var("hxxp://asd-asd.de", 
FILTER_VALIDATE_URL));'
string(17) "http://asd-asd.de";
@eniac ~> 


CentOS 5, 2.6.18-194.8.1.el5.028stab070.5 , PHP 5.2.9 

@www1 ~> php -r 'var_dump(filter_var("hxxp://asd_asd.de", 
FILTER_VALIDATE_URL));'
string(17) "http://asd_asd.de";
@www1 ~> php -r 'var_dump(filter_var("hxxp://asd-asd.de", 
FILTER_VALIDATE_URL));'
string(17) "http://asd-asd.de";

well, this is the bug, but fixed in upstream.


FreeBSD 8.0-RELEASE-p4,  PHP 5.3.5 with Suhosin-Patch (cli) (built: Mar 14 2011 
17:47:34), package php5-5.3.5 (compiled from ports)

@www-backup ...db/pkg> php -r 'var_dump(filter_var("hxxp://asd_asd.de", 
FILTER_VALIDATE_URL));'
string(17) "http://asd_asd.de";
@www-backup ...db/pkg> php -r 'var_dump(filter_var("hxxp://asd-asd.de", 
FILTER_VALIDATE_URL));'
bool(false)
@www-backup ...db/pkg> 


What is wrong with it on FreeBSD ?????

Seems that it is more build or OS related problem, than php itself.

------------------------------------------------------------------------
[2011-03-15 15:39:25] [email protected]

Oh, and:

# php -r 'var_dump(filter_var("http://ea_sd.com";, FILTER_VALIDATE_URL));'
bool(false)

------------------------------------------------------------------------
[2011-03-15 15:38:21] [email protected]

# php -v
PHP 5.3.5 (cli) (built: Mar 15 2011 07:36:59) 

# php -r 'var_dump(filter_var("http://ea-sd.com";, FILTER_VALIDATE_URL));'
string(16) "http://ea-sd.com";

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=54255


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=54255&edit=1

Reply via email to