### 1.1.10a (10.1.2005) ###
### Thanks to obliv. :)
- Fixed a security error.
This commit is contained in:
Jamin Blount 2017-02-05 11:10:55 -06:00
parent e8e4cc9e54
commit fbf3c6ba75

34
lib.php
View File

@ -2,27 +2,39 @@
$starttime = getmicrotime();
$numqueries = 0;
$version = "1.1.10";
$version = "1.1.10a";
$build = "";
// Handling for servers with magic_quotes turned on.
// Example from php.net.
if (get_magic_quotes_gpc()) {
function stripslashes_deep($value)
{
$value = is_array($value) ?
array_map('stripslashes_deep', $value) :
stripslashes($value);
return $value;
}
$_POST = array_map('stripslashes_deep', $_POST);
$_GET = array_map('stripslashes_deep', $_GET);
$_COOKIE = array_map('stripslashes_deep', $_COOKIE);
}
$_POST = array_map('addslashes_deep', $_POST);
$_GET = array_map('addslashes_deep', $_GET);
$_COOKIE = array_map('addslashes_deep', $_COOKIE);
function stripslashes_deep($value) {
$value = is_array($value) ?
array_map('stripslashes_deep', $value) :
stripslashes($value);
return $value;
}
function addslashes_deep($value) {
$value = is_array($value) ?
array_map('addslashes_deep', $value) :
stripslashes($value);
return $value;
}
foreach($_POST as $a=>$b) { $_POST[$a] = addslashes($b); }
foreach($_GET as $a=>$b) { $_GET[$a] = addslashes($b); }
function opendb() { // Open database connection.