FIX: check for nil response on JsonCsrf protection

Some reaction do not return a response, think for example drop_session. In that case a nil response
would be returned, see issue #50.
This commit is contained in:
Matteo Centenaro 2013-04-08 11:23:05 +02:00
parent ac79948aaa
commit fa58e053f1
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ module Rack
if has_vector? request, headers
warn env, "attack prevented by #{self.class}"
react(env)
react(env) or [status, headers, body]
else
[status, headers, body]
end