diff options
author | Jeffrey Warren <jtwarren@alum.mit.edu> | 2015-12-10 14:42:41 -0500 |
---|---|---|
committer | Jeffrey Warren <jtwarren@alum.mit.edu> | 2015-12-10 14:42:41 -0500 |
commit | 7564da46f23bb0075390e44b5fbedcdc8a0c4dc5 (patch) | |
tree | 2f7dd01147e6aac87ba144fcd50e0a841edb9008 /activesupport/lib | |
parent | 2747e84be2f4a606e3178bbcc8ac95765deb0405 (diff) | |
download | rails-7564da46f23bb0075390e44b5fbedcdc8a0c4dc5.tar.gz rails-7564da46f23bb0075390e44b5fbedcdc8a0c4dc5.tar.bz2 rails-7564da46f23bb0075390e44b5fbedcdc8a0c4dc5.zip |
Correct the time comparison for remember_me token
Corrects the time comparison to be `Time.now < time` which allows the user to
be set only when the current time is less than the 2 week window given in the
example.
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/message_verifier.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/message_verifier.rb b/activesupport/lib/active_support/message_verifier.rb index 64c5232cf4..854029bf83 100644 --- a/activesupport/lib/active_support/message_verifier.rb +++ b/activesupport/lib/active_support/message_verifier.rb @@ -15,7 +15,7 @@ module ActiveSupport # In the authentication filter: # # id, time = @verifier.verify(cookies[:remember_me]) - # if time < Time.now + # if Time.now < time # self.current_user = User.find(id) # end # |