mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-03 07:18:08 +02:00
[ticket/11508] Allow equal sign in parameter value.
PHPBB3-11508
This commit is contained in:
@@ -254,16 +254,18 @@ class path_helper
|
|||||||
|
|
||||||
foreach ($args as $argument)
|
foreach ($args as $argument)
|
||||||
{
|
{
|
||||||
$arguments = explode('=', $argument);
|
if (empty($argument))
|
||||||
$key = $arguments[0];
|
{
|
||||||
unset($arguments[0]);
|
continue;
|
||||||
|
}
|
||||||
|
list($key, $value) = explode('=', $argument, 2);
|
||||||
|
|
||||||
if ($key === '')
|
if ($key === '')
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$params[$key] = $arguments[1];
|
$params[$key] = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -226,6 +226,21 @@ class phpbb_path_helper_test extends phpbb_test_case
|
|||||||
true,
|
true,
|
||||||
array('base' => 'https://phpbb.com/community/viewtopic.php', 'params' => array('t' => '5', 'f' => '6')),
|
array('base' => 'https://phpbb.com/community/viewtopic.php', 'params' => array('t' => '5', 'f' => '6')),
|
||||||
),
|
),
|
||||||
|
array(
|
||||||
|
'test.php?topic=post=5&f=3',
|
||||||
|
true,
|
||||||
|
array('base' => 'test.php', 'params' => array('topic' => 'post=5', 'f' => '3')),
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'mcp.php?&t=4&f=3',
|
||||||
|
true,
|
||||||
|
array('base' => 'mcp.php', 'params' => array('t' => '4', 'f' => '3')),
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'mcp.php?=4&f=3',
|
||||||
|
true,
|
||||||
|
array('base' => 'mcp.php', 'params' => array('f' => '3')),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user