mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/12202] Can't call htmlspecialchars before checking for quotes
PHPBB3-12202
This commit is contained in:
@@ -3368,7 +3368,7 @@ function parse_cfg_file($filename, $lines = false)
|
|||||||
|
|
||||||
// Determine first occurrence, since in values the equal sign is allowed
|
// Determine first occurrence, since in values the equal sign is allowed
|
||||||
$key = htmlspecialchars(strtolower(trim(substr($line, 0, $delim_pos))));
|
$key = htmlspecialchars(strtolower(trim(substr($line, 0, $delim_pos))));
|
||||||
$value = htmlspecialchars(trim(substr($line, $delim_pos + 1)));
|
$value = trim(substr($line, $delim_pos + 1));
|
||||||
|
|
||||||
if (in_array($value, array('off', 'false', '0')))
|
if (in_array($value, array('off', 'false', '0')))
|
||||||
{
|
{
|
||||||
@@ -3386,6 +3386,10 @@ function parse_cfg_file($filename, $lines = false)
|
|||||||
{
|
{
|
||||||
$value = htmlspecialchars(substr($value, 1, sizeof($value)-2));
|
$value = htmlspecialchars(substr($value, 1, sizeof($value)-2));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$value = htmlspecialchars($value);
|
||||||
|
}
|
||||||
|
|
||||||
$parsed_items[$key] = $value;
|
$parsed_items[$key] = $value;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user