diff --git a/server/src/infra/ldap_handler.rs b/server/src/infra/ldap_handler.rs index 345719a..cfa736f 100644 --- a/server/src/infra/ldap_handler.rs +++ b/server/src/infra/ldap_handler.rs @@ -865,6 +865,22 @@ mod tests { ldap_handler.do_bind(&request).await.0, LdapResultCode::NamingViolation, ); + let request = LdapBindRequest { + dn: "cn=bob,ou=people,dc=example,dc=fr".to_string(), + cred: LdapBindCred::Simple("pass".to_string()), + }; + assert_eq!( + ldap_handler.do_bind(&request).await.0, + LdapResultCode::NamingViolation, + ); + let request = LdapBindRequest { + dn: "cn=bob=test,ou=people,dc=example,dc=com".to_string(), + cred: LdapBindCred::Simple("pass".to_string()), + }; + assert_eq!( + ldap_handler.do_bind(&request).await.0, + LdapResultCode::NamingViolation, + ); } #[test]