From fe290aa21436705d702a40f3b1d75dccaccc4394 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 27 Feb 2021 16:49:59 +0100 Subject: [PATCH] sources/ldap: fix password setter on users which are not LDAP --- authentik/sources/ldap/password.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/authentik/sources/ldap/password.py b/authentik/sources/ldap/password.py index fc26a0431..65c042b68 100644 --- a/authentik/sources/ldap/password.py +++ b/authentik/sources/ldap/password.py @@ -77,7 +77,8 @@ class LDAPPasswordChanger: """Change user's password""" user_dn = user.attributes.get(LDAP_DISTINGUISHED_NAME, None) if not user_dn: - raise AttributeError(f"User has no {LDAP_DISTINGUISHED_NAME} set.") + LOGGER.info(f"User has no {LDAP_DISTINGUISHED_NAME} set.") + return self._source.connection.extend.microsoft.modify_password(user_dn, password) def _ad_check_password_existing(self, password: str, user_dn: str) -> bool: