Bug #67755 [Opn->Nab]: Malformation HTTP GET request in array form with equal sign

From: Date: Mon, 04 Aug 2014 08:15:15 +0000
Subject: Bug #67755 [Opn->Nab]: Malformation HTTP GET request in array form with equal sign
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186954@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67755&edit=1 ID: 67755 Updated by: requinix@php.net Reported by: fethi dot kus at tribal-im dot com Summary: Malformation HTTP GET request in array form with equal sign -Status: Open +Status: Not a bug Type: Bug Package: Streams related Operating System: Centos 6.5 PHP Version: 5.5.15 Block user comment: N Private report: N New Comment: The HTTP/URL specs do not give special consideration for the [] array syntax that PHP (and a couple other languages) support. = is a reserved character and if needed for something other than its reserved purpose then it must be percent-encoded. As for the underscore, PHP starts with "query1[" as the key and it replaces the '[' with an underscore for historical purposes. Previous Comments: ------------------------------------------------------------------------ [2014-08-04 08:01:51] fethi dot kus at tribal-im dot com Description: ------------ An HTTP GET request in array form with equal sign gives an unexpected result. Test script: --------------- //Http Request #index.php?query1[=]=1 print_r($_GET); //or print_r(filter_input_array(INPUT_GET)); Expected result: ---------------- Array ( [query1] => Array ( [=] => 1 ) ) Actual result: -------------- Array ( [query1_] => ]=1 ) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67755&edit=1

« previous php.bugs (#186954) next »