throw an exception in the request forged method if no session driver has been specified.

This commit is contained in:
Taylor Otwell 2011-11-16 22:40:49 -06:00
parent 980caf31da
commit 466ccdb96c
1 changed files with 5 additions and 0 deletions

View File

@ -121,6 +121,11 @@ public static function secure()
*/
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();
}