mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Quick (and expensive) fix to detect DNs with embedded NULs
This commit is contained in:
parent
fcf835558e
commit
b2d948f0e5
@ -470,6 +470,11 @@ dnPrettyNormal(
|
||||
pretty->bv_len = 0;
|
||||
normal->bv_len = 0;
|
||||
|
||||
/* FIXME: str2dn should take a bv and handle this */
|
||||
if( strlen( val->bv_val ) != val->bv_len ) {
|
||||
return LDAP_INVALID_SYNTAX;
|
||||
}
|
||||
|
||||
/* FIXME: should be liberal in what we accept */
|
||||
rc = ldap_str2dn( val->bv_val, &dn, LDAP_DN_FORMAT_LDAP );
|
||||
if ( rc != LDAP_SUCCESS ) {
|
||||
|
Loading…
Reference in New Issue
Block a user