From 8542d53aff36fe50bcd6415cab6bd326576cf0ac Mon Sep 17 00:00:00 2001 From: Michael Bai Date: Thu, 28 Oct 2021 14:42:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dldap=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=97=B6=E5=AD=97=E6=AE=B5=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?strip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/settings/utils/ldap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/settings/utils/ldap.py b/apps/settings/utils/ldap.py index 890ac32e8..cb65d5539 100644 --- a/apps/settings/utils/ldap.py +++ b/apps/settings/utils/ldap.py @@ -184,7 +184,7 @@ class LDAPServerUtil(object): if attr == 'is_active' and mapping.lower() == 'useraccountcontrol' \ and value: value = int(value) & LDAP_AD_ACCOUNT_DISABLE != LDAP_AD_ACCOUNT_DISABLE - user[attr] = value + user[attr] = value.strip() if isinstance(value, str) else value return user def user_entries_to_dict(self, user_entries):