From 1f7ac11baa8bc48f53534144703a4cdef9cb2b25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sat, 8 Aug 2015 10:00:49 +0200 Subject: [PATCH] feat(ldap): added support for compound search filter expressions, closes #2472 --- pkg/login/ldap.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/login/ldap.go b/pkg/login/ldap.go index 72414bf8bab..f3699efab0d 100644 --- a/pkg/login/ldap.go +++ b/pkg/login/ldap.go @@ -243,7 +243,7 @@ func (a *ldapAuther) searchForUser(username string) (*ldapUserInfo, error) { a.server.Attr.Name, a.server.Attr.MemberOf, }, - Filter: fmt.Sprintf(a.server.SearchFilter, username), + Filter: strings.Replace(a.server.SearchFilter, "%s", username, -1), } searchResult, err = a.conn.Search(&searchReq)