Commit 466ccdb9 by Taylor Otwell

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

parent 980caf31
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment