Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit eb7e4c9a176dcde3e5dbb269e6f9c890904d3461 1 parent d1f0300
@bugant bugant authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/rack/protection/json_csrf.rb
View
2  lib/rack/protection/json_csrf.rb
@@ -19,7 +19,7 @@ def call(env)
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
Please sign in to comment.
Something went wrong with that request. Please try again.