v1.1.10a
### 1.1.10a (10.1.2005) ### ### Thanks to obliv. :) - Fixed a security error.
This commit is contained in:
parent
e8e4cc9e54
commit
fbf3c6ba75
34
lib.php
34
lib.php
|
@ -2,27 +2,39 @@
|
||||||
|
|
||||||
$starttime = getmicrotime();
|
$starttime = getmicrotime();
|
||||||
$numqueries = 0;
|
$numqueries = 0;
|
||||||
$version = "1.1.10";
|
$version = "1.1.10a";
|
||||||
$build = "";
|
$build = "";
|
||||||
|
|
||||||
// Handling for servers with magic_quotes turned on.
|
// Handling for servers with magic_quotes turned on.
|
||||||
// Example from php.net.
|
// Example from php.net.
|
||||||
if (get_magic_quotes_gpc()) {
|
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);
|
$_POST = array_map('stripslashes_deep', $_POST);
|
||||||
$_GET = array_map('stripslashes_deep', $_GET);
|
$_GET = array_map('stripslashes_deep', $_GET);
|
||||||
$_COOKIE = array_map('stripslashes_deep', $_COOKIE);
|
$_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.
|
function opendb() { // Open database connection.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user