From:             demtheman at yahoo dot com
Operating system: Windows 7 64-bit
PHP version:      5.3.26
Package:          URL related
Bug Type:         Bug
Bug description:filter_var() validates URL with two http:// as valid

Description:
------------
I used filter_var() to validate the URL http://http://www.google.com (as
test 
URL), however it seems to see it as valid which in fact is wrong. Refer to
my SO 
question
http://stackoverflow.com/questions/17333612/filter-var-accepts-invalid-
url

Test script:
---------------
$website = "http://http://www.google.com";;

echo filter_var($website, FILTER_VALIDATE_URL);

Expected result:
----------------
The filter_var() should return FALSE.

Actual result:
--------------
The filter_var() returns the filtered data.

-- 
Edit bug report at https://bugs.php.net/bug.php?id=65141&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=65141&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=65141&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=65141&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=65141&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=65141&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=65141&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=65141&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=65141&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=65141&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=65141&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=65141&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=65141&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=65141&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65141&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=65141&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=65141&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=65141&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65141&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=65141&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=65141&r=mysqlcfg

Reply via email to