[PR #1074] [MERGED] server: include preserved case in user attribute value search (#1073) #1104

Closed
opened 2026-02-27 09:10:55 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/lldap/lldap/pull/1074
Author: @broeng
Created: 1/12/2025
Status: Merged
Merged: 1/22/2025
Merged by: @nitnelave

Base: mainHead: attrval-search-fix


📝 Commits (2)

  • ce0e4e7 server: include preserved case in user attribute value search (#1073)
  • 0a44d79 Merge branch 'main' into attrval-search-fix

📊 Changes

3 files changed (+132 additions, -34 deletions)

View changed files

📝 server/src/domain/ldap/group.rs (+26 -15)
📝 server/src/domain/ldap/user.rs (+27 -14)
📝 server/src/infra/ldap_handler.rs (+79 -5)

📄 Description

Extends the generated UserRequestFilter with an OR'ed clause for the attribute value in both it's original case and lowercased.

So, where the search was previously (attr=LOWERCASE(value)) it is now basicly (|(attr=LOWERCASE(value))(attr=value)). This matters, because the DB search is case sensitive, so it was only possible to resolve attributes with lowercase values. Original behavior is still compatible.

The value => value_lc changes are just variable renaming. The value variable, was redefined as a lowercased version of the original value variable, and was therefore shadowing the original. As I need the original unmodified value, I thought it best to restore that, and avoid the shadowing.

Fixes issue #1073.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/lldap/lldap/pull/1074 **Author:** [@broeng](https://github.com/broeng) **Created:** 1/12/2025 **Status:** ✅ Merged **Merged:** 1/22/2025 **Merged by:** [@nitnelave](https://github.com/nitnelave) **Base:** `main` ← **Head:** `attrval-search-fix` --- ### 📝 Commits (2) - [`ce0e4e7`](https://github.com/lldap/lldap/commit/ce0e4e79d674b8667bd22dccc2d35b00b943beb3) server: include preserved case in user attribute value search (#1073) - [`0a44d79`](https://github.com/lldap/lldap/commit/0a44d79ca65363c7350e277575614c863aaa7da8) Merge branch 'main' into attrval-search-fix ### 📊 Changes **3 files changed** (+132 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `server/src/domain/ldap/group.rs` (+26 -15) 📝 `server/src/domain/ldap/user.rs` (+27 -14) 📝 `server/src/infra/ldap_handler.rs` (+79 -5) </details> ### 📄 Description Extends the generated UserRequestFilter with an OR'ed clause for the attribute value in both it's original case and lowercased. So, where the search was previously `(attr=LOWERCASE(value))` it is now basicly `(|(attr=LOWERCASE(value))(attr=value))`. This matters, because the DB search is case sensitive, so it was only possible to resolve attributes with lowercase values. Original behavior is still compatible. The `value => value_lc` changes are just variable renaming. The `value` variable, was redefined as a lowercased version of the original `value` variable, and was therefore shadowing the original. As I need the original unmodified value, I thought it best to restore that, and avoid the shadowing. Fixes issue #1073. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 09:10:55 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/lldap-lldap#1104
No description provided.