Fixed possible code injection incase session variables are compromised

This commit is contained in:
Herman van Rink
2011-06-29 13:02:00 +02:00
parent 6e6e129f26
commit 2e01647949
2 changed files with 2 additions and 1 deletions

View File

@@ -286,7 +286,7 @@ class ConfigFile
if ($this->getServerCount() > 0) {
$ret .= "/* Servers configuration */$crlf\$i = 0;" . $crlf . $crlf;
foreach ($c['Servers'] as $id => $server) {
$ret .= '/* Server: ' . strtr($this->getServerName($id), '*/', '-') . " [$id] */" . $crlf
$ret .= '/* Server: ' . strtr($this->getServerName($id) . " [$id] ", '*/', '-') . "*/" . $crlf
. '$i++;' . $crlf;
foreach ($server as $k => $v) {
$k = preg_replace('/[^A-Za-z0-9_]/', '_', $k);