internal/ldap: Log unsupported search filters
This commit is contained in:
parent
65e76b3c73
commit
69798ffe7a
|
@ -37,6 +37,7 @@ func (s *server) handleSearchEntities(w ldap.ResponseWriter, m *ldap.Message) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// If err is non-nil at this point it must mean that
|
// If err is non-nil at this point it must mean that
|
||||||
// the above match didn't find a supported filter.
|
// 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 := ldap.NewSearchResultDoneResponse(ldap.LDAPResultUnwillingToPerform)
|
||||||
res.SetDiagnosticMessage("Filter type not supported")
|
res.SetDiagnosticMessage("Filter type not supported")
|
||||||
w.Write(res)
|
w.Write(res)
|
||||||
|
@ -105,6 +106,7 @@ func (s *server) handleSearchGroups(w ldap.ResponseWriter, m *ldap.Message) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// If err is non-nil at this point it must mean that
|
// If err is non-nil at this point it must mean that
|
||||||
// the above match didn't find a supported filter.
|
// 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 := ldap.NewSearchResultDoneResponse(ldap.LDAPResultUnwillingToPerform)
|
||||||
res.SetDiagnosticMessage("Filter type not supported")
|
res.SetDiagnosticMessage("Filter type not supported")
|
||||||
w.Write(res)
|
w.Write(res)
|
||||||
|
|
Loading…
Reference in a new issue