From 8772789e1a4dbf7a94717bf8a3c76b6dfbab4844 Mon Sep 17 00:00:00 2001 From: CravateRouge Date: Fri, 10 Feb 2023 11:51:08 +0100 Subject: [PATCH] Fix NTLM auth bug when pwd is empty --- ldap3/core/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ldap3/core/connection.py b/ldap3/core/connection.py index c062d3aa..c48e45d2 100644 --- a/ldap3/core/connection.py +++ b/ldap3/core/connection.py @@ -621,7 +621,7 @@ def bind(self, log(ERROR, '%s for <%s>', self.last_error, self) raise LDAPSASLMechanismNotSupportedError(self.last_error) elif self.authentication == NTLM: - if self.user and self.password and len(self.user.split('\\')) == 2: + if self.user and self.password is not None and len(self.user.split('\\')) == 2: if log_enabled(PROTOCOL): log(PROTOCOL, 'performing NTLM BIND for <%s>', self) if not self.strategy.pooled: