Skip to content

Commit

Permalink
Merge pull request #17 from nevans/thread-safety
Browse files Browse the repository at this point in the history
Make TokenVerifier#call safely reentrant
  • Loading branch information
sikachu committed Mar 15, 2024
2 parents 3d11b22 + 7d4d26c commit c50a1f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/omniauth/rails_csrf_protection/token_verifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ class TokenVerifier
end

def call(env)
dup._call(env)
end

def _call(env)
@request = ActionDispatch::Request.new(env.dup)

unless verified_request?
Expand Down

0 comments on commit c50a1f1

Please sign in to comment.