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 + ")" }