instance method
unmask_token
Ruby on Rails 8.0.4
Since v5.2.8.1 PrivateSignature
unmask_token(masked_token)
No documentation comment.
Parameters
-
masked_tokenreq
Source
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 532
def unmask_token(masked_token) # :doc:
# Split the token into the one-time pad and the encrypted value and decrypt it.
one_time_pad = masked_token[0...AUTHENTICITY_TOKEN_LENGTH]
encrypted_csrf_token = masked_token[AUTHENTICITY_TOKEN_LENGTH..-1]
xor_byte_strings(one_time_pad, encrypted_csrf_token)
end
Defined in actionpack/lib/action_controller/metal/request_forgery_protection.rb line 532
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::RequestForgeryProtection