Minor coding style modification.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
This commit is contained in:
parent
831a34ba37
commit
ca419e70e8
@ -29,21 +29,22 @@ function PMA_removeRequestVars(&$whitelist)
|
||||
foreach ($keys as $key) {
|
||||
if (! in_array($key, $whitelist)) {
|
||||
unset($_REQUEST[$key], $_GET[$key], $_POST[$key], $GLOBALS[$key]);
|
||||
} else {
|
||||
// allowed stuff could be compromised so escape it
|
||||
// we require it to be a string
|
||||
if (isset($_REQUEST[$key]) && ! is_string($_REQUEST[$key])) {
|
||||
unset($_REQUEST[$key]);
|
||||
}
|
||||
if (isset($_POST[$key]) && ! is_string($_POST[$key])) {
|
||||
unset($_POST[$key]);
|
||||
}
|
||||
if (isset($_COOKIE[$key]) && ! is_string($_COOKIE[$key])) {
|
||||
unset($_COOKIE[$key]);
|
||||
}
|
||||
if (isset($_GET[$key]) && ! is_string($_GET[$key])) {
|
||||
unset($_GET[$key]);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// allowed stuff could be compromised so escape it
|
||||
// we require it to be a string
|
||||
if (isset($_REQUEST[$key]) && ! is_string($_REQUEST[$key])) {
|
||||
unset($_REQUEST[$key]);
|
||||
}
|
||||
if (isset($_POST[$key]) && ! is_string($_POST[$key])) {
|
||||
unset($_POST[$key]);
|
||||
}
|
||||
if (isset($_COOKIE[$key]) && ! is_string($_COOKIE[$key])) {
|
||||
unset($_COOKIE[$key]);
|
||||
}
|
||||
if (isset($_GET[$key]) && ! is_string($_GET[$key])) {
|
||||
unset($_GET[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user