various refactorings.
This commit is contained in:
@@ -145,6 +145,18 @@ class Request {
|
||||
return isset($_SERVER['HTTPS']) and strtolower($_SERVER['HTTPS']) !== 'off';
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the request has been forged.
|
||||
*
|
||||
* The session CSRF token will be compared to the CSRF token in the request input.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function forged()
|
||||
{
|
||||
return Input::get('csrf_token') !== Session::token();
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the current request is an AJAX request.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user