check_authenticity(); restricted_modification(); */ /** * @param $area * @return bool * @deprecated. See above comment */ function ask_ticket($area) { $_SESSION['antisurf'] = $area; return true; } /** * @param $area * * @return bool * @throws Exception * @deprecated. See above comment */ function check_ticket($area) { if (! isset($_SESSION['antisurf'])) { $_SESSION['antisurf'] = ''; } if ($_SESSION['antisurf'] != $area) { global $prefs; $_SESSION['antisurf'] = $area; if ($prefs['feature_ticketlib'] == 'y') { $smarty = TikiLib::lib('smarty'); $smarty->assign('post', $_POST); $smarty->assign('query', $_SERVER['QUERY_STRING']); $smarty->assign('self', $_SERVER['PHP_SELF']); $smarty->assign('msg', tra('Possible cross-site request forgery (CSRF, or "sea surfing") detected. Operation blocked.')); $smarty->display('error_ticket.tpl'); die; } } return true; }