You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2018/12/30 10:28:00 UTC

[GitHub] stale[bot] closed pull request #4133: [AIRFLOW-3270] Allow passwordless-binding for LDAP auth backend

stale[bot] closed pull request #4133: [AIRFLOW-3270] Allow passwordless-binding for LDAP auth backend
URL: https://github.com/apache/incubator-airflow/pull/4133
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/airflow/contrib/auth/backends/ldap_auth.py b/airflow/contrib/auth/backends/ldap_auth.py
index fefc389e48..240fe0fa2a 100644
--- a/airflow/contrib/auth/backends/ldap_auth.py
+++ b/airflow/contrib/auth/backends/ldap_auth.py
@@ -57,6 +57,12 @@ class LdapException(Exception):
 def get_ldap_connection(dn=None, password=None):
     tls_configuration = None
     use_ssl = False
+
+    if dn == "":
+        dn = None
+    if password == "":
+        password = None
+
     try:
         cacert = configuration.conf.get("ldap", "cacert")
         tls_configuration = Tls(validate=ssl.CERT_REQUIRED, ca_certs_file=cacert)


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services