/** * Check if we have a CSRF happening * @param $action */ protected static function ensureCsrfTokenValidity($action) { // is the token valid? $isCsrfTokenValid = CsrfHelper::validateRequest($action); if (!$isCsrfTokenValid) { // nope? Come on, not you again. static::exitWithEatSpamException('CSRF validation Failed.'); } }