Bug #74780 [NEW]: parse_url() borks when query string contains colon

From: Date: Mon, 19 Jun 2017 12:13:15 +0000
Subject: Bug #74780 [NEW]: parse_url() borks when query string contains colon
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209591@lists.php.net to get a copy of this message
From: dm Operating system: PHP version: 7.2.0alpha1 Package: *General Issues Bug Type: Bug Bug description:parse_url() borks when query string contains colon Description: ------------ When query string contains : (colon) parse_url() fails parses relative URIs improperly (like it happened before 5.4.7). For 5.6 or older: If query string contains e.g. a=1:337 then port will be 337, when it's e.g. a=b:c then the port is correct. https://3v4l.org/aBfGB Test script: --------------- <?php var_dump( parse_url('//php.net/manual/en/function.parse-url.php?v=1:337') ); Expected result: ---------------- array(3) { ["host"]=> string(7) "php.net" ["path"]=> string(33) "/manual/en/function.parse-url.php" ["query"]=> string(7) "v=1:337" } Actual result: -------------- array(2) { ["path"]=> string(42) "//php.net/manual/en/function.parse-url.php" ["query"]=> string(7) "v=1:337" } -- Edit bug report at https://bugs.php.net/bug.php?id=74780&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74780&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74780&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74780&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=74780&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=74780&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=74780&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=74780&r=needscript Try newer version: https://bugs.php.net/fix.php?id=74780&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=74780&r=support Expected behavior: https://bugs.php.net/fix.php?id=74780&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=74780&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=74780&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=74780&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74780&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=74780&r=dst IIS Stability: https://bugs.php.net/fix.php?id=74780&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=74780&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=74780&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=74780&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=74780&r=mysqlcfg

« previous php.bugs (#209591) next »