#49197 [Opn->Bgs]: FILTER_VALIDATE_URL does not validate urls

From: Date: Sun, 09 Aug 2009 12:56:51 +0000
Subject: #49197 [Opn->Bgs]: FILTER_VALIDATE_URL does not validate urls
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-140820@lists.php.net to get a copy of this message
 ID:          49197
 Updated by:  iliaa@php.net
 Reported By: matt dot farina at gmail dot com
-Status:      Open
+Status:      Bogus
 Bug Type:    Filter related
 PHP Version: 5.2.10
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php

.


Previous Comments:
------------------------------------------------------------------------

[2009-08-08 14:32:15] matt dot farina at gmail dot com

Description:
------------
FILTER_VALIDATE_URL doesn't actually validate a url. It passes the url

through parse_url (which according to the documentation is not meant to

validate a url). When tested against a test set this can be seen.

Instead of this method PHP should use a regex or some other method to 
actually validate it. See
http://api.drupal.org/api/function/valid_url/6

for an example that is to RFC 3986.

I would hope for PHP 6 we can have it look for a valid IRL (with 
international characters) as well.



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


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



Thread (3 messages)

« previous php.bugs (#140820) next »