mirror of
https://github.com/nitnelave/lldap.git
synced 2023-04-12 14:25:13 +00:00
ldap: Test more invalid DNs
This commit is contained in:
parent
62745970c6
commit
06b6653dff
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user