function strip_key($array, $deep = 0) { foreach ($array as $k => $v) { if ($deep && !preg_match("/^[a-z0-9_\\-]{1,}\$/i", $k)) { dhttp(403, 0); dalert('HTTP 403 Forbidden', DT_PATH); } if (is_array($v)) { strip_key($v, 1); } } }
require DT_ROOT . '/include/session_' . $CFG['session'] . '.class.php'; require DT_ROOT . '/include/file.func.php'; if (!empty($_SERVER['REQUEST_URI'])) { strip_uri($_SERVER['REQUEST_URI']); } if ($_POST) { $_POST = strip_sql($_POST); strip_key($_POST); } if ($_GET) { $_GET = strip_sql($_GET); strip_key($_GET); } if ($_COOKIE) { $_COOKIE = strip_sql($_COOKIE); strip_key($_COOKIE); } if (!IN_ADMIN) { $BANIP = cache_read('banip.php'); if ($BANIP) { banip($BANIP); } $destoon_task = ''; } if ($_POST) { extract($_POST, EXTR_SKIP); } if ($_GET) { extract($_GET, EXTR_SKIP); } $db_class = 'db_' . $CFG['database'];