Skip to content
Snippets Groups Projects
Commit caca6dfa authored by ale's avatar ale
Browse files

fix parsing of app-specific passwords in LDAP

parent f726dd7d
Branches
No related tags found
No related merge requests found
......@@ -116,7 +116,14 @@ class User(model.User):
self._otp_enabled = True
self._totp_secret = values[0]
elif key == SCHEMA['app_specific_password']:
self._asps = [v.split(':', 1) for v in values]
# Format is service:password:comment. Ignore the
# comment, and avoid dying on malformed input.
self._asps = []
for v in values:
try:
self._asps.append(v.split(':')[:2])
except:
pass
elif key == SCHEMA['shard']:
self._shard = values[0]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment