Ticket #3316: models.py.patch

File models.py.patch, 471 bytes (added by axiak@…, 17 years ago)

Patch to add crypt support to auth hashes

  • ./models.py

    old new  
    1717    elif algo == 'sha1':
    1818        import sha
    1919        return hsh == sha.new(salt+raw_password).hexdigest()
     20    elif algo == 'crypt': # axiak addition
     21        import crypt
     22        return hsh == crypt.crypt(raw_password, salt)
    2023    raise ValueError, "Got unknown password algorithm type in password."
    2124
    2225class SiteProfileNotAvailable(Exception):
Back to Top