Skip to content

Commit

Permalink
Adding ldap.EscapeFilter
Browse files Browse the repository at this point in the history
- Prevents break search filter strings with special characters
- go-ldap/ldap#338 (comment)
  • Loading branch information
wiltonsr committed Nov 3, 2022
1 parent 2a89abe commit d27cc40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ldapauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ func LdapCheckUserGroups(conn *ldap.Conn, config *Config, entry *ldap.Entry, use
"(member=%s)"+
"(uniqueMember=%s)"+
"(memberUid=%s)"+
")", entry.DN, entry.DN, username)
")", ldap.EscapeFilter(entry.DN), ldap.EscapeFilter(entry.DN), ldap.EscapeFilter(username))

LoggerDEBUG.Printf("Searching Group: '%s' with User: '%s'", g, entry.DN)

Expand Down

0 comments on commit d27cc40

Please sign in to comment.