/** * Cleans the request from script injection. * * @static * @return void * @since 1.1 */ function clean() { vmRequest::_cleanArray($_FILES); vmRequest::_cleanArray($_ENV); vmRequest::_cleanArray($_GET); vmRequest::_cleanArray($_POST); vmRequest::_cleanArray($_COOKIE); vmRequest::_cleanArray($_SERVER); if (isset($_SESSION)) { vmRequest::_cleanArray($_SESSION); } $REQUEST = $_REQUEST; $GET = $_GET; $POST = $_POST; $COOKIE = $_COOKIE; $FILES = $_FILES; $ENV = $_ENV; $SERVER = $_SERVER; if (isset($_SESSION)) { $SESSION = $_SESSION; } foreach ($GLOBALS as $key => $value) { if ($key != 'GLOBALS') { unset($GLOBALS[$key]); } } $_REQUEST = $REQUEST; $_GET = $GET; $_POST = $POST; $_COOKIE = $COOKIE; $_FILES = $FILES; $_ENV = $ENV; $_SERVER = $SERVER; if (isset($SESSION)) { $_SESSION = $SESSION; } // Make sure the request hash is clean on file inclusion $GLOBALS['_VMREQUEST'] = array(); }