mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #28718 -- Allowed user to request a password reset if their password doesn't use an enabled hasher.
Regression inaeb1389442. Reverted changes to is_password_usable() from703c266682and documentation changes from92f48680db.
This commit is contained in:
@@ -276,9 +276,11 @@ class TestUtilsHashPass(SimpleTestCase):
|
||||
with self.assertRaisesMessage(ValueError, msg % 'lolcat'):
|
||||
identify_hasher('lolcat$salt$hash')
|
||||
|
||||
def test_bad_encoded(self):
|
||||
self.assertFalse(is_password_usable('lètmein_badencoded'))
|
||||
self.assertFalse(is_password_usable(''))
|
||||
def test_is_password_usable(self):
|
||||
passwords = ('lètmein_badencoded', '', None)
|
||||
for password in passwords:
|
||||
with self.subTest(password=password):
|
||||
self.assertIs(is_password_usable(password), True)
|
||||
|
||||
def test_low_level_pbkdf2(self):
|
||||
hasher = PBKDF2PasswordHasher()
|
||||
|
||||
Reference in New Issue
Block a user