Use constant-time compare in permissions.py for password identifying
This commit is contained in:
parent
9667b8a6e0
commit
ce23442f4b
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ class Module(ModuleManager.BaseModule):
|
|||
hash, salt = self._get_hash(event["server"], account)
|
||||
if hash and salt:
|
||||
attempt, _ = self._make_hash(password, salt)
|
||||
if attempt == hash:
|
||||
if utils.security.constant_time_compare(attempt, hash):
|
||||
self._identified(event["server"], event["user"], account)
|
||||
event["stdout"].write("Correct password, you have "
|
||||
"been identified as '%s'." % account)
|
||||
|
|
Loading…
Add table
Reference in a new issue