diff options
author | Azul <azul@leap.se> | 2014-05-01 10:45:57 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2014-05-26 09:58:40 +0200 |
commit | 5764daae090227bf4c5967900b708392c967be47 (patch) | |
tree | d611429113b8b0ebc363f8b0333c6896a41c7ced /app/controllers/controller_extension | |
parent | 0f686b1256b4190522bcb101ba06cd2c7406eb36 (diff) |
hash token with sha512 against timing attacs #3398
Diffstat (limited to 'app/controllers/controller_extension')
-rw-r--r-- | app/controllers/controller_extension/token_authentication.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/controller_extension/token_authentication.rb b/app/controllers/controller_extension/token_authentication.rb index 6e0a6ce..b0ed624 100644 --- a/app/controllers/controller_extension/token_authentication.rb +++ b/app/controllers/controller_extension/token_authentication.rb @@ -2,8 +2,8 @@ module ControllerExtension::TokenAuthentication extend ActiveSupport::Concern def token - @token ||= authenticate_with_http_token do |token_id, options| - Token.find(token_id) + @token ||= authenticate_with_http_token do |token, options| + Token.find_by_token(token) end end |