1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 04:38:27 +01:00

Fixes #5005 GET values containing arrays are no longer corrupted.

This commit is contained in:
Cameron 2023-06-06 15:46:50 -07:00
parent 10d59384a6
commit c2bc635774
2 changed files with 3 additions and 1 deletions

View File

@ -5522,7 +5522,8 @@ class e107
} }
$eMENUQry = str_replace(array('%5B','%5D'),array('[',']'), $queryString); //FIX for urlencoded QUERY_STRING without breaking the '+' used by debug. $eMENUQry = str_replace(array('%5B','%5D'),array('[',']'), $queryString); //FIX for urlencoded QUERY_STRING without breaking the '+' used by debug.
if (strpos($eMENUQry, ']') && preg_match('#\[(.*?)](.*)#', $eMENUQry, $matches))
if (strpos($eMENUQry, ']') && preg_match('#^\[(.*?)](.*)#', $eMENUQry, $matches))
{ {
if(!defined('e_MENU')) if(!defined('e_MENU'))
{ {

View File

@ -1983,6 +1983,7 @@ class e107Test extends \Codeception\Test\Unit
'mode=main&action=create' => 'mode=main&action=create', 'mode=main&action=create' => 'mode=main&action=create',
'[debug=counts!]mode=pref_editor&type=vstore' => 'mode=pref_editor&type=vstore', '[debug=counts!]mode=pref_editor&type=vstore' => 'mode=pref_editor&type=vstore',
'searchquery=šýá&mode=main' => 'searchquery=šýá&mode=main', 'searchquery=šýá&mode=main' => 'searchquery=šýá&mode=main',
'mode=main&action=custom&other[key]=1' => 'mode=main&action=custom&other[key]=1',
); );
foreach($tests as $input => $expected) foreach($tests as $input => $expected)