From 1c09e1fc1c24d26dc5b5ba27d1d3f61820bac60c Mon Sep 17 00:00:00 2001 From: wemeya Date: Thu, 22 Sep 2016 15:23:55 +0800 Subject: [PATCH] modify ldap filter --- auth/ldap/ldap.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth/ldap/ldap.go b/auth/ldap/ldap.go index 2681be5f7..ff66107a2 100644 --- a/auth/ldap/ldap.go +++ b/auth/ldap/ldap.go @@ -77,7 +77,7 @@ func (l *Auth) Authenticate(m models.AuthModel) (*models.User, error) { attrName := os.Getenv("LDAP_UID") filter := os.Getenv("LDAP_FILTER") if filter != "" { - filter = "(&(" + filter + ")(" + attrName + "=" + m.Principal + "))" + filter = "(&" + filter + "(" + attrName + "=" + m.Principal + "))" } else { filter = "(" + attrName + "=" + m.Principal + ")" }