From 466ccdb96ca1995213c0547806d092903c28495f Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 16 Nov 2011 22:40:49 -0600 Subject: [PATCH] throw an exception in the request forged method if no session driver has been specified. --- laravel/request.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/laravel/request.php b/laravel/request.php index 303b88ed..2df3e214 100644 --- a/laravel/request.php +++ b/laravel/request.php @@ -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(); }