Skip to content

Instantly share code, notes, and snippets.

@mctaylorpants
Last active June 14, 2019 16:09
Show Gist options
  • Save mctaylorpants/a4dea16adea5b03ca791a1e0782cd361 to your computer and use it in GitHub Desktop.
Save mctaylorpants/a4dea16adea5b03ca791a1e0782cd361 to your computer and use it in GitHub Desktop.
def compare_with_real_token(token, session) # :doc:
ActiveSupport::SecurityUtils.fixed_length_secure_compare(token, real_csrf_token(session))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment