Browse Source
Invalidate sessions when changing password or kdf values
pull/1170/head
Daniel García
5 years ago
No known key found for this signature in database
GPG Key ID: FC8A7D14C3CD543A
1 changed files with
1 additions and
0 deletions
-
src/db/models/user.rs
|
|
@ -121,6 +121,7 @@ impl User { |
|
|
|
|
|
|
|
pub fn set_password(&mut self, password: &str) { |
|
|
|
self.password_hash = crypto::hash_password(password.as_bytes(), &self.salt, self.password_iterations as u32); |
|
|
|
self.reset_security_stamp(); |
|
|
|
} |
|
|
|
|
|
|
|
pub fn reset_security_stamp(&mut self) { |
|
|
|