From 7564da46f23bb0075390e44b5fbedcdc8a0c4dc5 Mon Sep 17 00:00:00 2001 From: Jeffrey Warren Date: Thu, 10 Dec 2015 14:42:41 -0500 Subject: 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. --- activesupport/lib/active_support/message_verifier.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport') 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 # -- cgit v1.2.3