core (memory/params): fixed exception when setting an empty password

This commit is contained in:
Goffi 2016-03-26 18:43:54 +01:00
commit 046fb62a52

View file

@ -879,6 +879,8 @@ class Params(object):
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)