fix for attack via FILES
This commit is contained in:
@@ -8,6 +8,8 @@ $Source$
|
|||||||
2006-09-29 Marc Delisle <lem9@users.sourceforge.net>
|
2006-09-29 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* libraries/database_interface.lib.php, bug #1566904, typo in require,
|
* libraries/database_interface.lib.php, bug #1566904, typo in require,
|
||||||
thanks to Björn Wiberg - bwiberg.
|
thanks to Björn Wiberg - bwiberg.
|
||||||
|
* libraries/grab_globals.lib.php: fix attack via _FILES,
|
||||||
|
thanks to Stefan Esser
|
||||||
|
|
||||||
2006-09-27 Marc Delisle <lem9@users.sourceforge.net>
|
2006-09-27 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* libraries/.htaccess: remove potential vulnerability (allow from none),
|
* libraries/.htaccess: remove potential vulnerability (allow from none),
|
||||||
|
@@ -91,9 +91,12 @@ if (! empty($_POST)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($_FILES)) {
|
if (! empty($_FILES)) {
|
||||||
foreach ($_FILES as $name => $value) {
|
$_valid_variables = preg_replace($GLOBALS['_import_blacklist'], '', array_keys($_FILES));
|
||||||
$$name = $value['tmp_name'];
|
foreach ($_valid_variables as $name) {
|
||||||
${$name . '_name'} = $value['name'];
|
if (strlen($name) != 0) {
|
||||||
|
$$name = $_FILES[$name]['tmp_name'];
|
||||||
|
${$name . '_name'} = $_FILES[$name]['name'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
unset($name, $value);
|
unset($name, $value);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user