[PR #1297] [MERGED] ldap: normalize base DN in LdapInfo, reduce memory usage #1241

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

📋 Pull Request Information

Original PR: https://github.com/lldap/lldap/pull/1297
Author: @nitnelave
Created: 9/16/2025
Status: Merged
Merged: 9/16/2025
Merged by: @nitnelave

Base: mainHead: ldap_info


📝 Commits (1)

  • b86501d ldap: normalize base DN in LdapInfo, reduce memory usage

📊 Changes

5 files changed (+63 additions, -59 deletions)

View changed files

📝 crates/ldap/src/core/utils.rs (+27 -0)
📝 crates/ldap/src/handler.rs (+14 -24)
📝 crates/ldap/src/lib.rs (+1 -1)
📝 crates/ldap/src/search.rs (+1 -2)
📝 server/src/ldap_server.rs (+20 -32)

📄 Description

By making it a &'static, we can have a single allocation for all the threads/async contexts.

This also normalizes the whitespace from the user input; a trailing \n can cause weird issues with clients


🔄 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/1297 **Author:** [@nitnelave](https://github.com/nitnelave) **Created:** 9/16/2025 **Status:** ✅ Merged **Merged:** 9/16/2025 **Merged by:** [@nitnelave](https://github.com/nitnelave) **Base:** `main` ← **Head:** `ldap_info` --- ### 📝 Commits (1) - [`b86501d`](https://github.com/lldap/lldap/commit/b86501d74908877fd598821864d03f7ec459b576) ldap: normalize base DN in LdapInfo, reduce memory usage ### 📊 Changes **5 files changed** (+63 additions, -59 deletions) <details> <summary>View changed files</summary> 📝 `crates/ldap/src/core/utils.rs` (+27 -0) 📝 `crates/ldap/src/handler.rs` (+14 -24) 📝 `crates/ldap/src/lib.rs` (+1 -1) 📝 `crates/ldap/src/search.rs` (+1 -2) 📝 `server/src/ldap_server.rs` (+20 -32) </details> ### 📄 Description By making it a &'static, we can have a single allocation for all the threads/async contexts. This also normalizes the whitespace from the user input; a trailing \n can cause weird issues with clients --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 09:11:27 +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#1241
No description provided.