various refactorings.

This commit is contained in:
Taylor Otwell
2011-11-02 21:27:43 -05:00
parent 128984facb
commit 9caf239f6b
29 changed files with 275 additions and 150 deletions

View File

@@ -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.
*