throw an exception in the request forged method if no session driver has been specified.
This commit is contained in:
parent
980caf31da
commit
466ccdb96c
|
@ -121,6 +121,11 @@ public static function secure()
|
||||||
*/
|
*/
|
||||||
public static function forged()
|
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();
|
return Input::get('csrf_token') !== IoC::core('session')->token();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue