summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/contrib/auth/hashers.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/django/contrib/auth/hashers.py b/django/contrib/auth/hashers.py
index b56f74f0d9..0188f4a4e7 100644
--- a/django/contrib/auth/hashers.py
+++ b/django/contrib/auth/hashers.py
@@ -337,6 +337,10 @@ class BCryptSHA256PasswordHasher(BasePasswordHasher):
(_('checksum'), mask_hash(checksum)),
])
+ def must_update(self, encoded):
+ algorithm, empty, algostr, rounds, data = encoded.split('$', 4)
+ return int(rounds) != self.rounds
+
class BCryptPasswordHasher(BCryptSHA256PasswordHasher):
"""