mirror of
https://github.com/wassname/flask-security.git
synced 2026-08-11 11:18:40 +08:00
Add more secure password storage via salt value and hmac
This commit is contained in:
@@ -113,7 +113,10 @@ class UserDatastore(object):
|
||||
pw = kwargs['password']
|
||||
|
||||
if not pwd_context.identify(pw):
|
||||
kwargs['password'] = pwd_context.encrypt(pw)
|
||||
pwd_hash = utils.encrypt_password(pw,
|
||||
salt=_security.password_salt,
|
||||
use_hmac=_security.password_hmac)
|
||||
kwargs['password'] = pwd_hash
|
||||
|
||||
kwargs['remember_token'] = utils.get_remember_token(kwargs['email'],
|
||||
kwargs['password'])
|
||||
|
||||
Reference in New Issue
Block a user