You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by cr...@apache.org on 2017/01/05 19:06:43 UTC

incubator-airflow git commit: [AIRFLOW-702] Fix LDAP Regex Bug

Repository: incubator-airflow
Updated Branches:
  refs/heads/master 3f7b87501 -> 794540f95


[AIRFLOW-702] Fix LDAP Regex Bug

Closes #1945 from robin-miller-
ow/feature/LDAPAuthRegexFix


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/794540f9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/794540f9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/794540f9

Branch: refs/heads/master
Commit: 794540f9591cf6e3b7e182d0e2a26ddd14cc1f92
Parents: 3f7b875
Author: robin_miller_ow <ro...@affiliate.oliverwyman.com>
Authored: Thu Jan 5 11:06:28 2017 -0800
Committer: Chris Riccomini <ch...@wepay.com>
Committed: Thu Jan 5 11:06:28 2017 -0800

----------------------------------------------------------------------
 airflow/contrib/auth/backends/ldap_auth.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/794540f9/airflow/contrib/auth/backends/ldap_auth.py
----------------------------------------------------------------------
diff --git a/airflow/contrib/auth/backends/ldap_auth.py b/airflow/contrib/auth/backends/ldap_auth.py
index 3e175ae..24a63bc 100644
--- a/airflow/contrib/auth/backends/ldap_auth.py
+++ b/airflow/contrib/auth/backends/ldap_auth.py
@@ -100,7 +100,7 @@ def groups_user(conn, search_base, user_filter, user_name_att, username):
 
     user_groups = conn.response[0]["attributes"]["memberOf"]
 
-    regex = re.compile("cn=([^,]*).*")
+    regex = re.compile("cn=([^,]*).*", re.IGNORECASE)
     groups_list = []
     try:
         groups_list = [regex.search(i).group(1) for i in user_groups]