Commit d65f4020 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

improve fix to ITS#2923; note that suffix massaging is inherently flawed,...

improve fix to ITS#2923; note that suffix massaging is inherently flawed, because comperisons should always occur on Normalized DN, while massaging can also occur on Pretty DN, but there is no guarantee they have the same length or any length-based comparison can work; so in any case, we should pass the Normalized DN and, if the Pretty DN is present, massage it as well accordingly
parent 2c049ebb
......@@ -144,7 +144,7 @@ ldap_back_search(
dc.ctx = "searchBase";
#else
dc.tofrom = 1;
dc.normalized = 1;
dc.normalized = 0;
#endif
if ( ldap_back_dn_massage( &dc, &op->o_req_ndn, &mbase ) ) {
send_ldap_result( op, rs );
......
......@@ -135,7 +135,7 @@ ldap_back_dn_massage(
/* At a DN Separator */
}
if ( !strcmp( dc->rwmap->rwm_suffix_massage[i+src].bv_val, &dn->bv_val[diff] ) ) {
if ( !strcasecmp( dc->rwmap->rwm_suffix_massage[i+src].bv_val, &dn->bv_val[diff] ) ) {
res->bv_len = diff + dc->rwmap->rwm_suffix_massage[i+dst].bv_len;
res->bv_val = ch_malloc( res->bv_len + 1 );
strncpy( res->bv_val, dn->bv_val, diff );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment