# HG changeset patch # User RĂ©mi Cardona # Date 1442334161 -7200 # Node ID 4383f5a30504425a7b9219fbc00f1d9cb4cb549a # Parent 1b4df4b3cd9af43cebc90e56fa28b5d638e4a231 [server/utils] crypt_password should always return bytes diff -r 1b4df4b3cd9a -r 4383f5a30504 server/utils.py --- a/server/utils.py Tue Sep 15 18:21:33 2015 +0200 +++ b/server/utils.py Tue Sep 15 18:22:41 2015 +0200 @@ -64,7 +64,7 @@ """return the encrypted password using the given salt or a generated one """ if salt is None: - return _CRYPTO_CTX.encrypt(passwd) + return _CRYPTO_CTX.encrypt(passwd).encode('ascii') # empty hash, accept any password for backwards compat if salt == '': return salt @@ -74,7 +74,7 @@ except ValueError: # e.g. couldn't identify hash pass # wrong password - return '' + return b'' def eschema_eid(cnx, eschema):