Skip to content

Commit cefbbb5

Browse files
committed
fixed user.get("past_passwords_hash", [])
1 parent 28f06e7 commit cefbbb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py4web/utils/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ def change_password(
805805
}
806806
}
807807
if self.param.block_previous_password_num:
808-
past_pwds = (user.past_passwords_hash or [])[
808+
past_pwds = user.get("past_passwords_hash", [])[
809809
: self.param.block_previous_password_num
810810
]
811811
if any(new_pwd == old_pwd for old_pwd in past_pwds):

0 commit comments

Comments
 (0)