Repository: lldap/lldap (language: rust)

Issue:
[BUG] lldap panicks if userIdentity DN for password modify extended contains upper cases
**Describe the bug**
lldap  shows a panick in the logs if the `userIdentity` dn from the password modify extended operation contains upper case values, and the client just gets a sudden EOF as a result.

On stable:

```
thread 'actix-rt|system:0|arbiter:0' panicked at 'assertion failed: dn == dn.to_ascii_lowercase()', server/src/domain/ldap/utils.rs:53:5
```

On latest:

```
thread 'actix-rt|system:0|arbiter:0' panicked at server/src/domain/ldap/utils.rs:57:5:
assertion failed: dn == dn.to_ascii_lowercase()
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

stacktrace:

```
thread 'actix-rt|system:0|arbiter:0' panicked at server/src/domain/ldap/utils.rs:57:5:
assertion failed: dn == dn.to_ascii_lowercase()
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: lldap::domain::ldap::utils::parse_distinguished_name
   4: lldap::domain::ldap::utils::get_id_from_distinguished_name
   5: lldap::domain::ldap::utils::get_user_id_from_distinguished_name
   6: lldap::infra::ldap_handler::LdapHandler<Backend>::handle_ldap_message::{{closure}}.15170
   7: lldap::infra::ldap_server::handle_ldap_message::{{closure}}::{{closure}}
   8: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll
   9: <actix_service::map_err::MapErrFuture<A,Req,F,E> as core::future::future::Future>::poll
  10: tokio::runtime::task::raw::poll
  11: tokio::task::local::LocalSet::tick
  12: <tokio::task::local::RunUntil<T> as core::future::future::Future>::poll
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
```

**Expected behavior**
It should not panick and return a proper result (or error) to the client



Discussion / hints:

Fix patch:
diff --git a/server/src/infra/ldap_handler.rs b/server/src/infra/ldap_handler.rs
index a3817378..0a79f332 100644
--- a/server/src/infra/ldap_handler.rs
+++ b/server/src/infra/ldap_handler.rs
@@ -345,7 +345,7 @@ impl<Backend: BackendHandler + LoginHandler + OpaqueHandler> LdapHandler<Backend
         match (&request.user_identity, &request.new_password) {
             (Some(user), Some(password)) => {
                 match get_user_id_from_distinguished_name(
-                    user,
+                    &user.to_ascii_lowercase(),
                     &self.ldap_info.base_dn,
                     &self.ldap_info.base_dn_str,
                 ) {


Test patch: