SECURITY: expire all existing sessions if user changes passwords

This commit is contained in:
Sam Saffron
2015-06-06 03:09:19 +10:00
parent 2da229cdaa
commit 4171eb758c
2 changed files with 16 additions and 7 deletions
+4 -1
View File
@@ -320,7 +320,10 @@ class User < ActiveRecord::Base
def password=(password)
# special case for passwordless accounts
@raw_password = password unless password.blank?
unless password.blank?
@raw_password = password
self.auth_token = nil
end
end
def password