diff --git a/server/src/infra/ldap_handler.rs b/server/src/infra/ldap_handler.rs index f2729a7..f9f2ea1 100644 --- a/server/src/infra/ldap_handler.rs +++ b/server/src/infra/ldap_handler.rs @@ -263,6 +263,12 @@ impl LdapHandler (LdapResultCode, String) { + if request.dn.is_empty() { + return ( + LdapResultCode::InappropriateAuthentication, + "Anonymous bind not allowed".to_string(), + ); + } let user_id = match get_user_id_from_distinguished_name( &request.dn.to_ascii_lowercase(), &self.ldap_info.base_dn,