<?php # experiment, see whether we can correct the magic quotes centrally function addSlashesArray($array) { foreach ($array as $key => $val) { if (is_array($val)) { $array[$key] = addSlashesArray($val); } else { $array[$key] = addslashes($val); } } return $array; } function removeSlashes(&$value, $key) { $value = stripslashes($value); } function stripSlashesArray($array) { array_walk_recursive($array, 'removeSlashes'); return $array; } if (!ini_get("magic_quotes_gpc") || ini_get("magic_quotes_gpc") == "off") { $_POST = addSlashesArray($_POST); $_GET = addSlashesArray($_GET); $_REQUEST = addSlashesArray($_REQUEST); $_COOKIE = addSlashesArray($_COOKIE); } function removeXss($string) { if (is_array($string)) { $return = array(); foreach ($string as $key => $val) { $return[removeXss($key)] = removeXss($val); } return $return; } #$string = preg_replace('/<script/im','<script',$string); $string = htmlspecialchars($string); return $string; } /* foreach ($_POST as $key => $val) { print "POST: $key = $val<br/>"; } foreach ($_GET as $key => $val) { print "GET: $key = $val<br/>"; } foreach ($_REQUEST as $key => $val) { print "REQ: $key = $val<br/>"; } foreach ($_REQUEST as $key => $val) { print "COOKIE: $key = $val<br/>"; } */ ?>
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
FirePHPCore | Folder | 0755 |
|
|
.htaccess | File | 31 B | 0644 |
|
Sajax.php | File | 5.52 KB | 0644 |
|
accesscheck.php | File | 87 B | 0644 |
|
debuglib.php | File | 879 B | 0644 |
|
errorlib.php | File | 6.45 KB | 0644 |
|
interfacelib.php | File | 41.66 KB | 0644 |
|
magic_quotes.php | File | 1.3 KB | 0644 |
|
maillib.php | File | 6.35 KB | 0644 |
|
oldphp_vars.php | File | 694 B | 0644 |
|
unregister_globals.php | File | 1018 B | 0644 |
|
userlib.php | File | 48.86 KB | 0644 |
|