From 69798ffe7ae66e41da6525b251345e4ec04f89fd Mon Sep 17 00:00:00 2001 From: Michael Aldridge Date: Sat, 16 Oct 2021 18:01:02 -0500 Subject: [PATCH] internal/ldap: Log unsupported search filters --- internal/ldap/search.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/ldap/search.go b/internal/ldap/search.go index 5774258..6fdb511 100644 --- a/internal/ldap/search.go +++ b/internal/ldap/search.go @@ -37,6 +37,7 @@ func (s *server) handleSearchEntities(w ldap.ResponseWriter, m *ldap.Message) { if err != nil { // If err is non-nil at this point it must mean that // the above match didn't find a supported filter. + s.l.Warn("Unsupported Search Filter, this is a bug, please file a report", "filter", r.Filter()) res := ldap.NewSearchResultDoneResponse(ldap.LDAPResultUnwillingToPerform) res.SetDiagnosticMessage("Filter type not supported") w.Write(res) @@ -105,6 +106,7 @@ func (s *server) handleSearchGroups(w ldap.ResponseWriter, m *ldap.Message) { if err != nil { // If err is non-nil at this point it must mean that // the above match didn't find a supported filter. + s.l.Warn("Unsupported Search Filter, this is a bug, please file a report", "filter", r.Filter()) res := ldap.NewSearchResultDoneResponse(ldap.LDAPResultUnwillingToPerform) res.SetDiagnosticMessage("Filter type not supported") w.Write(res)