Bug #55800 [Opn->Bgs]: FILTER_VALIDATE_URL validates wrong
| From: | aharvey@php.net | Date: | Tue, 27 Sep 2011 17:44:11 +0000 |
| Subject: | Bug #55800 [Opn->Bgs]: FILTER_VALIDATE_URL validates wrong | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-163925@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55800&edit=1
ID: 55800
Updated by: aharvey@php.net
Reported by: giuseppem at gmail dot com
Summary: FILTER_VALIDATE_URL validates wrong
-Status: Open
+Status: Bogus
Type: Bug
Package: Filter related
Operating System: Ubuntu 11.04
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
That's a valid URL: in this case, the path component is http://bugs.php.net/, and
that's explicitly allowed by RFC 3986 -- path components can include colons.
Previous Comments:
------------------------------------------------------------------------
[2011-09-27 13:28:32] giuseppem at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.filter-var
---
FILTER_VALIDATE_URL validates wrong when you set two or more urls together, for
example:
$url = 'http://php.net/http://bugs.php.net/';
I'm using PHP version 5.3.5
Test script:
---------------
<?php
$url = 'http://php.net/http://bugs.php.net/';
var_dump(filter_var($url, FILTER_VALIDATE_URL));
?>
Expected result:
----------------
bool(false)
Actual result:
--------------
string(35) "http://php.net/http://bugs.php.net/"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55800&edit=1