diff -Naur django.orig/contrib/auth/models.py django/contrib/auth/models.py
old
|
new
|
|
39 | 39 | Returns a boolean of whether the raw_password was correct. Handles |
40 | 40 | encryption formats behind the scenes. |
41 | 41 | """ |
42 | | algo, salt, hsh = enc_password.split('$') |
43 | | return constant_time_compare(hsh, get_hexdigest(algo, salt, raw_password)) |
| 42 | try: |
| 43 | algo, salt, hsh = enc_password.split('$') |
| 44 | return constant_time_compare(hsh, get_hexdigest(algo, salt, raw_password)) |
| 45 | except ValueError: |
| 46 | return False |
44 | 47 | |
45 | 48 | def update_last_login(sender, user, **kwargs): |
46 | 49 | """ |