mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 08:15:52 +03:00
[PR #1363] [MERGED] Fix cn attribute case-insensitive matching in LDAP equality filters #1278
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#1278
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?
📋 Pull Request Information
Original PR: https://github.com/lldap/lldap/pull/1363
Author: @Copilot
Created: 12/10/2025
Status: ✅ Merged
Merged: 1/31/2026
Merged by: @nitnelave
Base:
main← Head:copilot/fix-ldapsearch-unexpected-behavior📝 Commits (3)
c478cd9Fix cn search case sensitivity bug - make DisplayName match case-insensitively7e844e2Optimize DisplayName filter to avoid redundant conditions when value is already lowercase8949d5bRun cargo fmt to format code📊 Changes
1 file changed (+58 additions, -0 deletions)
View changed files
📝
crates/ldap/src/core/user.rs(+58 -0)📄 Description
Fix cn attribute case-insensitive matching in LDAP equality filters
Root Cause Analysis
cn=TestAllfilter doesn't match users withcn: TestAll/crates/ldap/src/core/user.rsFix Implementation
convert_user_filterto handle DisplayName case-insensitively (like attributes)Validation
Summary
The fix changes the LDAP filter handling for
cn(DisplayName) to match case-insensitively by creating an OR filter with both the original value and lowercase value when they differ. This ensures that searches likecn=TestAllwill match users with display name "TestAll", "testall", or any other case variation, conforming to LDAP's case-insensitive matching semantics.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.