fixes #574, new checks on plugin section in URL

This commit is contained in:
plegall
2017-01-01 19:40:53 +01:00
parent beee647b74
commit 9004fdfc0b
+7 -1
View File
@@ -32,10 +32,16 @@ check_status(ACCESS_ADMINISTRATOR);
$sections = explode('/', $_GET['section'] );
for ($i=0; $i<count($sections); $i++)
{
if (empty($sections[$i]) or $sections[$i]=='..')
if (empty($sections[$i]))
{
unset($sections[$i]);
$i--;
continue;
}
if ($sections[$i] == '..' or !preg_match('/^[a-zA-Z_\.-]+$/', $sections[$i]))
{
die('invalid section token ['.htmlentities($sections[$i]).']');
}
}