Skip to content
Snippets Groups Projects
Commit b2d948f0 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Quick (and expensive) fix to detect DNs with embedded NULs

parent fcf83555
No related branches found
No related tags found
No related merge requests found
......@@ -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 ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment