Mercurial > libervia-backend
diff src/memory/params.py @ 1931:2c55e7e99ef3
core (memory/params): fixed exception when setting an empty password
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 26 Mar 2016 18:43:54 +0100 |
parents | fb94f92dc740 |
children | 2daf7b4c6756 |
line wrap: on
line diff
--- a/src/memory/params.py Sat Mar 26 16:15:23 2016 +0100 +++ b/src/memory/params.py Sat Mar 26 18:43:54 2016 +0100 @@ -879,6 +879,8 @@ d.addCallback(lambda dummy: PasswordHasher.hash(value)) # profile password is hashed (empty value stays empty) elif value: # other non empty passwords are encrypted with the personal key d = BlockCipher.encrypt(personal_key, value) + else: + d = defer.succeed(value) else: d = defer.succeed(value)