Bug #76010 [NEW]: Built in server slices the $_SERVER['REQUEST_URI'] value

From: Date: Mon, 26 Feb 2018 08:06:29 +0000
Subject: Bug #76010 [NEW]: Built in server slices the $_SERVER['REQUEST_URI'] value
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214107@lists.php.net to get a copy of this message
From: t dot gemza at secit dot pl Operating system: Windows 7 and 8 64bit PHP version: 7.2.2 Package: Built-in web server Bug Type: Bug Bug description:Built in server slices the $_SERVER['REQUEST_URI'] value Description: ------------ The built in server slices the $_SERVER['REQUEST_URI'] value as shown on examples below. The problem is confirmed on Windows 7 and 8 64bit machines with following PHP versions: VC15 x64 Non Thread Safe (2018-Jan-31 23:18:33) http://windows.php.net/downloads/releases/php-7.2.2-nts-Win32-VC15-x64.zip VC15 x64 Thread Safe (2018-Jan-31 23:18:51) http://windows.php.net/downloads/releases/php-7.2.2-Win32-VC15-x64.zip VC14 x64 Non Thread Safe (2018-Jan-31 23:22:44) http://windows.php.net/downloads/releases/php-7.1.14-nts-Win32-VC14-x64.zip VC14 x64 Thread Safe (2018-Jan-31 23:23:00) http://windows.php.net/downloads/releases/php-7.1.14-Win32-VC14-x64.zip The problem was also confirmed on machines with PHP 7.1.10 and 7.2.1 (XAMP). The problem will never be 100% reproducable. In our tests the full REQUST_URI was returned in about 3% of all of the test script runs. So if you can not reproduce it try different PHP version and than back to the previously tested - it should appear. Test script: --------------- ---- CODE START ---- <?php echo $_SERVER['REQUEST_URI']; ---- CODE END ---- CURL command: curl "http://127.0.0.1:8001/administrator/dealer/account/?draw=3^&columns^%^5B0^%^5D^%^5Bdata^%^5D=id^&columns^%^5B0^%^5D^%^5Bname^%^5D=^&columns^%^5B0^%^5D^%^5Bsearchable^%^5D=true^&columns^%^5B0^%^5D^%^5Borderable^%^5D=true^&columns^%^5B0^%^5D^%^5Bsearch^%^5D^%^5Bvalue^%^5D=^&columns^%^5B0^%^5D^%^5Bsearch^%^5D^%^5Bregex^%^5D=false^&columns^%^5B1^%^5D^%^5Bdata^%^5D=name^&columns^%^5B1^%^5D^%^5Bname^%^5D=^&columns^%^5B1^%^5D^%^5Bsearchable^%^5D=true^&columns^%^5B1^%^5D^%^5Borderable^%^5D=true^&columns^%^5B1^%^5D^%^5Bsearch^%^5D^%^5Bvalue^%^5D=^&columns^%^5B1^%^5D^%^5Bsearch^%^5D^%^5Bregex^%^5D=false^&columns^%^5B2^%^5D^%^5Bdata^%^5D=lastName^&columns^%^5B2^%^5D^%^5Bname^%^5D=^&columns^%^5B2^%^5D^%^5Bsearchable^%^5D=true^&columns^%^5B2^%^5D^%^5Borderable^%^5D=true^&columns^%^5B2^%^5D^%^5Bsearch^%^5D^%^5Bvalue^%^5D=^&columns^%^5B2^%^5D^%^5Bsearch^%^5D^%^5Bregex^%^5D=false^&columns^%^5B3^%^5D^%^5Bdata^%^5D=address^&columns^%^5B3^%^5D^%^5Bname^%^5D=^&columns^%^5B3^%^5D^%^5Bsearchable! ^%^5D=true^&columns^%^5B3^%^5D^%^5Borderable^%^5D=true^&columns^%^5B3^%^5D^%^5Bsearch^%^5D^%^5Bvalue^%^5D=^&columns^%^5B3^%^5D^%^5Bsearch^%^5D^%^5Bregex^%^5D=false^&columns^%^5B4^%^5D^%^5Bdata^%^5D=postalCode^&columns^%^5B4^%^5D^%^5Bname^%^5D=^&columns^%^5B4^%^5D^%^5Bsearchable^%^5D=true^&columns^%^5B4^%^5D^%^5Borderable^%^5D=true^&columns^%^5B4^%^5D^%^5Bsearch^%^5D^%^5Bvalue^%^5D=^&columns^%^5B4^%^5D^%^5Bsearch^%^5D^%^5Bregex^%^5D=false^&columns^%^5B5^%^5D^%^5Bdata^%^5D=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" Expected result: ---------------- Whole request URI started with /administrator/dealer/account/?draw=3&... Actual result: -------------- C:\>curl "http://127.0.0.1:8001/administrator/dealer/account/?draw=3^& columns^%^5B0^%^5D^%^5Bdata^%^5D=id^&columns^%^5B0^%^5D^%^5Bname^%^5D=^&columns^ %^5B0^%^5D^%^5Bsearchable^%^5D=true^&columns^%^5B0^%^5D^%^5Borderable^%^5D=true^ &columns^%^5B0^%^5D^%^5Bsearch^%^5D^%^5Bvalue^%^5D=^&columns^%^5B0^%^5D^%^5Bsear ch^%^5D^%^5Bregex^%^5D=false^&columns^%^5B1^%^5D^%^5Bdata^%^5D=name^&columns^%^5 B1^%^5D^%^5Bname^%^5D=^&columns^%^5B1^%^5D^%^5Bsearchable^%^5D=true^&columns^%^5 B1^%^5D^%^5Borderable^%^5D=true^&columns^%^5B1^%^5D^%^5Bsearch^%^5D^%^5Bvalue^%^ 5D=^&columns^%^5B1^%^5D^%^5Bsearch^%^5D^%^5Bregex^%^5D=false^&columns^%^5B2^%^5D ^%^5Bdata^%^5D=lastName^&columns^%^5B2^%^5D^%^5Bname^%^5D=^&columns^%^5B2^%^5D^% ^5Bsearchable^%^5D=true^&columns^%^5B2^%^5D^%^5Borderable^%^5D=true^&columns^%^5 B2^%^5D^%^5Bsearch^%^5D^%^5Bvalue^%^5D=^&columns^%^5B2^%^5D^%^5Bsearch^%^5D^%^5B regex^%^5D=false^&columns^%^5B3^%^5D^%^5Bdata^%^5D=address^&columns^%^5B3^%^5D^% ^5Bname^%^5D=^&columns^%^5B3^%^5D^%^5Bsearchable^%^5D=true^&columns^%^5B3^%^5D^% ^5Borderable^%^5D=true^&columns^%^5B3^%^5D^%^5Bsearch^%^5D^%^5Bvalue^%^5D=^&colu mns^%^5B3^%^5D^%^5Bsearch^%^5D^%^5Bregex^%^5D=false^&columns^%^5B4^%^5D^%^5Bdata ^%^5D=postalCode^&columns^%^5B4^%^5D^%^5Bname^%^5D=^&columns^%^5B4^%^5D^%^5Bsear chable^%^5D=true^&columns^%^5B4^%^5D^%^5Borderable^%^5D=true^&columns^%^5B4^%^5D ^%^5Bsearch^%^5D^%^5Bvalue^%^5D=^&columns^%^5B4^%^5D^%^5Bsearch^%^5D^%^5Bregex^% ^5D=false^&columns^%^5B5^%^5D^%^5Bdata^%^5D=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXX" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Only the XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX are returned -- Edit bug report at https://bugs.php.net/bug.php?id=76010&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76010&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76010&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76010&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=76010&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=76010&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=76010&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=76010&r=needscript Try newer version: https://bugs.php.net/fix.php?id=76010&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=76010&r=support Expected behavior: https://bugs.php.net/fix.php?id=76010&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=76010&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=76010&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=76010&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76010&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=76010&r=dst IIS Stability: https://bugs.php.net/fix.php?id=76010&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=76010&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=76010&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=76010&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=76010&r=mysqlcfg

« previous php.bugs (#214107) next »