summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-13 20:21:51 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-13 20:21:51 +0300
commit00882b3c33cb377b903cdf8e2b91149081739785 (patch)
tree5774060b6ec972aaca57781a30e704b81a81bd12
parent46231f0f1d2d8aad0712ba98a6368af138a8561c (diff)
downloadgitlab-ce-00882b3c33cb377b903cdf8e2b91149081739785.tar.gz
Prevent infinit password change by settin password_expires_at to nil
-rw-r--r--app/controllers/passwords_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/passwords_controller.rb b/app/controllers/passwords_controller.rb
index 73b06f79e0f..0e5b42178a7 100644
--- a/app/controllers/passwords_controller.rb
+++ b/app/controllers/passwords_controller.rb
@@ -19,7 +19,8 @@ class PasswordsController < ApplicationController
)
if result
- redirect_to root_path(notice: 'Password successfully changed')
+ @user.update_attributes(password_expires_at: nil)
+ redirect_to root_path, notice: 'Password successfully changed'
else
render :new
end