summaryrefslogtreecommitdiffstats
path: root/app/controllers/my_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-02-15 09:09:35 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-02-15 09:09:35 +0000
commit76e7025f07165af4763b941540190b1d693898ac (patch)
tree1592fe996e26432ff38a6ed965b8425c1b7adc0b /app/controllers/my_controller.rb
parent77061f59f2e7b12cf83ebf73e2724092b49a4d14 (diff)
downloadredmine-76e7025f07165af4763b941540190b1d693898ac.tar.gz
redmine-76e7025f07165af4763b941540190b1d693898ac.zip
Workaround for timestamps rounding issues with Rails4.2 and mysql5.7 that may kill user session after password is changed (#17460).
git-svn-id: http://svn.redmine.org/redmine/trunk@14011 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/my_controller.rb')
-rw-r--r--app/controllers/my_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb
index 8ef263ebc..982541db1 100644
--- a/app/controllers/my_controller.rb
+++ b/app/controllers/my_controller.rb
@@ -102,7 +102,7 @@ class MyController < ApplicationController
if @user.save
# Reset the session creation time to not log out this session on next
# request due to ApplicationController#force_logout_if_password_changed
- session[:ctime] = Time.now.utc.to_i
+ session[:ctime] = User.current.passwd_changed_on.utc.to_i
flash[:notice] = l(:notice_account_password_updated)
redirect_to my_account_path
end