Macmod / godap

A complete TUI for LDAP.
MIT License
209 stars 7 forks source link

Queries for objects with parentheses in the searched attribute value fail #5

Closed Macmod closed 4 months ago

Macmod commented 4 months ago

When an object which has a parenthesis in its searched attribute is queried the query fails, supposedly because some characters need to be escaped before appended to the LDAP query. This bug may exist in several functions and be present in several features.

I'm not sure atm whether there is a proper way to prepare/sanitize LDAP queries before appending clauses, but the solution should be in that direction.

Macmod commented 4 months ago

Apparently ldap.EscapeFilter was all that was needed.