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

 ID:                 55800
 Updated by:         ahar...@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

Reply via email to