From 0dcbafaccb20387a7eb9985976cd83725e4dedb7 Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Fri, 5 Jul 2019 10:21:25 -0400 Subject: [PATCH] fix a bug that breaks OPT_X_TLS_REQUIRE_CERT=0 for LDAP authentication --- awx/sso/backends.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/sso/backends.py b/awx/sso/backends.py index ef0f934943..df9df8a57e 100644 --- a/awx/sso/backends.py +++ b/awx/sso/backends.py @@ -66,7 +66,7 @@ class LDAPSettings(BaseLDAPSettings): # see: https://github.com/python-ldap/python-ldap/issues/55 newctx_option = self.CONNECTION_OPTIONS.pop(ldap.OPT_X_TLS_NEWCTX, None) self.CONNECTION_OPTIONS = OrderedDict(self.CONNECTION_OPTIONS) - if newctx_option: + if newctx_option is not None: self.CONNECTION_OPTIONS[ldap.OPT_X_TLS_NEWCTX] = newctx_option