mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
fixes #574, new checks on plugin section in URL
This commit is contained in:
+7
-1
@@ -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]).']');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user