Ticket #6028: md5-crypt.diff
File md5-crypt.diff, 709 bytes (added by , 17 years ago) |
---|
-
django/contrib/auth/models.py
51 51 Returns a boolean of whether the raw_password was correct. Handles 52 52 encryption formats behind the scenes. 53 53 """ 54 algo, salt, hsh = enc_password.split('$') 54 algo, salt_and_hash = enc_password.split('$', 1) 55 if algo == 'crypt' and salt_and_hash.startswith('$1'): 56 salt = hsh = salt_and_hash 57 else: 58 salt, hsh = salt_and_hash.rsplit('$', 1) 55 59 return hsh == get_hexdigest(algo, salt, raw_password) 56 60 57 61 class SiteProfileNotAvailable(Exception):