mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
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
This commit is contained in:
parent
2c049ebb42
commit
d65f402058
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user