throw an exception in the request forged method if no session driver has been specified.
This commit is contained in:
@@ -121,6 +121,11 @@ class Request {
|
||||
*/
|
||||
public static function forged()
|
||||
{
|
||||
if (Config::$items['session']['driver'] == '')
|
||||
{
|
||||
throw new \LogicException("A session driver must be specified to use the CSRF filter.");
|
||||
}
|
||||
|
||||
return Input::get('csrf_token') !== IoC::core('session')->token();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user