Forgot to get the 'value' key here..

This commit is contained in:
Alexandre Aubin 2018-11-28 22:01:27 +00:00
parent 5461025479
commit 69d0503ba5

View file

@ -60,7 +60,7 @@ class PasswordValidator(object):
# (or at least that's my understanding -- Alex)
settings = json.load(open('/etc/yunohost/settings.json', "r"))
setting_key = "security.password." + profile + ".strength"
self.validation_strength = int(settings[setting_key])
self.validation_strength = int(settings[setting_key]["value"])
except Exception as e:
# Fallback to default value if we can't fetch settings for some reason
self.validation_strength = 1