mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 08:15:52 +03:00
[GH-ISSUE #763] [BUG] LDAP: Filtering custom attributes by value doesn't work #278
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#278
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nitnelave on GitHub (Dec 15, 2023).
Original GitHub issue: https://github.com/lldap/lldap/issues/763
Describe the bug
We search with the straight-up string given by LDAP, whereas we should use the schema to parse the attribute value and serialize it.
Note that repeated attributes cannot be searched by values.
@rabidpug commented on GitHub (Jan 14, 2024):
Does this mean that it's expected that lists cannot be used in filters currently?
And if yes, is it something that will be implemented in the future?
@nitnelave commented on GitHub (Jan 14, 2024):
@rabidpug no, attributes lists cannot be used in filters.
Supporting that would require a major redesign of the backend and would add significant complexity to the project, to the point that it might be just easier to use a standard LDAP server.
It all comes from the design decisions taken early on in the project: the data is stored in SQL as simple tables. When adding custom attributes, we have to serialize them to store them in the database. Lists are serialized as a single value, and the SQL engine doesn't understand the serialization. We could write a filter like "does the list contain exactly these values in this order" but that's not very helpful.