aboutsummaryrefslogtreecommitdiff
path: root/pkg/auth/ldap/ldap.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/auth/ldap/ldap.go')
-rw-r--r--pkg/auth/ldap/ldap.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/auth/ldap/ldap.go b/pkg/auth/ldap/ldap.go
index 3120b0ee..5b976460 100644
--- a/pkg/auth/ldap/ldap.go
+++ b/pkg/auth/ldap/ldap.go
@@ -56,7 +56,7 @@ func (ls *Source) sanitizedUserQuery(username string) (string, bool) {
return "", false
}
- return fmt.Sprintf(ls.Filter, username), true
+ return strings.Replace(ls.Filter, "%s", username, -1), true
}
func (ls *Source) sanitizedUserDN(username string) (string, bool) {
@@ -67,7 +67,7 @@ func (ls *Source) sanitizedUserDN(username string) (string, bool) {
return "", false
}
- return fmt.Sprintf(ls.UserDN, username), true
+ return strings.Replace(ls.UserDN, "%s", username, -1), true
}
func (ls *Source) sanitizedGroupFilter(group string) (string, bool) {