https://bugs.openldap.org/show_bug.cgi?id=9393
Issue ID: 9393 Summary: Provider a LDAP filter validation function Product: OpenLDAP Version: 2.4.56 Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: --- Component: libraries Assignee: bugs@openldap.org Reporter: best@univention.de Target Milestone: ---
In many situations I need to validate if a user submitted LDAP filter has valid syntax.
It seems there is no official function to check this. Could you provide one?
libraries/libldap/filter.c: ldap_pvt_put_filter() can be used as a basis.
-- My current workaround is using a unconnected ldap connection and do a search with that filter. This yields a FILTER_ERROR (invalid filter) or a SERVER_DOWN error (invalid filter).
See also: https://github.com/python-ldap/python-ldap/pull/272
https://bugs.openldap.org/show_bug.cgi?id=9393
best@univention.de best@univention.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Provider a LDAP filter |Provide a LDAP filter |validation function |validation function
https://bugs.openldap.org/show_bug.cgi?id=9393
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |needs_review
https://bugs.openldap.org/show_bug.cgi?id=9393
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.7.0 Keywords|needs_review |
https://bugs.openldap.org/show_bug.cgi?id=9393
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement
https://bugs.openldap.org/show_bug.cgi?id=9393
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Assignee|bugs@openldap.org |hyc@openldap.org Status|UNCONFIRMED |CONFIRMED
https://bugs.openldap.org/show_bug.cgi?id=9393
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |RESOLVED Resolution|--- |WONTFIX
--- Comment #1 from Howard Chu hyc@openldap.org --- You should simply use ldap_pvt_put_filter and then free the result if you don't need it. Separating the parsing from the memory allocation that put_filter does isn't really feasible, since a lot of the validation occurs in ber_printf() itself.
https://bugs.openldap.org/show_bug.cgi?id=9393
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED
https://bugs.openldap.org/show_bug.cgi?id=9393
--- Comment #2 from Ondřej Kuzník ondra@mistotebe.net --- Then we'd need to document and expose that function in openldap.h, I'm not against this?
https://bugs.openldap.org/show_bug.cgi?id=9393
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|WONTFIX |--- Status|VERIFIED |CONFIRMED
https://bugs.openldap.org/show_bug.cgi?id=9393
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|hyc@openldap.org |ondra@mistotebe.net
https://bugs.openldap.org/show_bug.cgi?id=9393
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |IN_PROGRESS
--- Comment #3 from Quanah Gibson-Mount quanah@openldap.org --- https://git.openldap.org/openldap/openldap/-/merge_requests/730
https://bugs.openldap.org/show_bug.cgi?id=9393
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|IN_PROGRESS |RESOLVED
--- Comment #4 from Quanah Gibson-Mount quanah@openldap.org --- • 5acbc6e9 by Ondřej Kuzník at 2024-10-26T00:27:50+00:00 ITS#9393 Expose and document ldap_pvt_put_filter