Bug #17533: parse_url shouldn't work with http://www..com

From: Date: Thu, 30 May 2002 21:53:25 +0000
Subject: Bug #17533: parse_url shouldn't work with http://www..com
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-8947@lists.php.net to get a copy of this message
From: dd@selftrade.com Operating system: RedHat 7.2 PHP version: 4.2.1 PHP Bug Type: *URL Functions Bug description: parse_url shouldn't work with http://www..com If you submit a url like www..com to parse_url, it will parse it without any error, although this kind of URL is incorrect. Try this: <? $url="http://www..com"; $a=parse_url($url); $host=$a[host]; $scheme=$a[scheme]; $path=$a[path]; echo("<LI>SCHEME=$scheme<LI>HOST=$host<LI>PATH=$path"); ?> It will return: SCHEME=http HOST=www..com PATH= The same kind of thing happens if url="qwerty", as it will return "qwerty" as the path. -- Edit bug report at http://bugs.php.net/?id=17533&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=17533&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=17533&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=17533&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=17533&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=17533&r=support Expected behavior: http://bugs.php.net/fix.php?id=17533&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=17533&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=17533&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=17533&r=globals

« previous php.bugs (#8947) next »