aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorJeffrey Warren <jtwarren@alum.mit.edu>2015-12-10 14:42:41 -0500
committerJeffrey Warren <jtwarren@alum.mit.edu>2015-12-10 14:42:41 -0500
commit7564da46f23bb0075390e44b5fbedcdc8a0c4dc5 (patch)
tree2f7dd01147e6aac87ba144fcd50e0a841edb9008 /activesupport
parent2747e84be2f4a606e3178bbcc8ac95765deb0405 (diff)
downloadrails-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')
-rw-r--r--activesupport/lib/active_support/message_verifier.rb2
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
#