Skip to content

Instantly share code, notes, and snippets.

@mctaylorpants
Last active April 8, 2018 23:58
Show Gist options
  • Save mctaylorpants/e9eb886f2c31342f3dfdcbc3f6bb0b20 to your computer and use it in GitHub Desktop.
Save mctaylorpants/e9eb886f2c31342f3dfdcbc3f6bb0b20 to your computer and use it in GitHub Desktop.
# actionpack/lib/action_controller/metal/request_forgery_protection.rb
def real_csrf_token(session) # :doc:
session[:_csrf_token] ||= SecureRandom.base64(AUTHENTICITY_TOKEN_LENGTH)
Base64.strict_decode64(session[:_csrf_token])
end
@tuyetanh93
Copy link

Real_csrt_token

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment