From 902c8b0bae90b04d3f1d91f0703c2a0eca4e39f1 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: May 22 2024 08:03:38 +0000 Subject: passwd: handle LDAP auto-bind use case as well Signed-off-by: Alexander Bokovoy Reviewed-By: Thomas Woerner Reviewed-By: Rob Crittenden Reviewed-By: Rafael Guterres Jeffman --- diff --git a/ipaserver/plugins/passwd.py b/ipaserver/plugins/passwd.py index 28273b4..d5bd45b 100644 --- a/ipaserver/plugins/passwd.py +++ b/ipaserver/plugins/passwd.py @@ -141,7 +141,7 @@ class passwd(Command): DN(api.env.container_user, api.env.basedn) ) - if principal == getattr(context, 'principal') and \ + if principal == getattr(context, 'principal', None) and \ current_password == MAGIC_VALUE: # No cheating logger.warning('User attempted to change password using magic '