aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2014-03-09 11:26:06 -0500
committerNathan Guse <nathaniel.guse@gmail.com>2014-03-09 15:19:52 -0500
commitf2d3879da419624a817b247efac73bad27887498 (patch)
treeeb276362d227d52357753742251143ffb4c1821e /phpBB/includes/functions.php
parent00f8fe24d2641823f51990b30d5a3f84884a78a6 (diff)
downloadforums-f2d3879da419624a817b247efac73bad27887498.tar
forums-f2d3879da419624a817b247efac73bad27887498.tar.gz
forums-f2d3879da419624a817b247efac73bad27887498.tar.bz2
forums-f2d3879da419624a817b247efac73bad27887498.tar.xz
forums-f2d3879da419624a817b247efac73bad27887498.zip
[ticket/12202] Apply htmlspecialchars to style.cfg data
PHPBB3-12202
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index eef4ade4e7..81a7dc5cbd 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3367,8 +3367,8 @@ function parse_cfg_file($filename, $lines = false)
}
// Determine first occurrence, since in values the equal sign is allowed
- $key = strtolower(trim(substr($line, 0, $delim_pos)));
- $value = trim(substr($line, $delim_pos + 1));
+ $key = htmlspecialchars(strtolower(trim(substr($line, 0, $delim_pos))));
+ $value = htmlspecialchars(trim(substr($line, $delim_pos + 1)));
if (in_array($value, array('off', 'false', '0')))
{
@@ -3384,7 +3384,7 @@ function parse_cfg_file($filename, $lines = false)
}
else if (($value[0] == "'" && $value[sizeof($value) - 1] == "'") || ($value[0] == '"' && $value[sizeof($value) - 1] == '"'))
{
- $value = substr($value, 1, sizeof($value)-2);
+ $value = htmlspecialchars(substr($value, 1, sizeof($value)-2));
}
$parsed_items[$key] = $value;