mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-23 16:19:35 -05:00
ITS#5927, don't cache queries with malformed entries in results
This commit is contained in:
parent
b7e54a5969
commit
58f33cbd1e
1 changed files with 13 additions and 0 deletions
|
|
@ -1993,6 +1993,19 @@ pcache_op_cleanup( Operation *op, SlapReply *rs ) {
|
||||||
goto over;
|
goto over;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* check for malformed entries: attrs with no values */
|
||||||
|
{
|
||||||
|
Attribute *a = e->e_attrs;
|
||||||
|
for (; a; a=a->a_next) {
|
||||||
|
if ( !a->a_numvals ) {
|
||||||
|
Debug( pcache_debug, "%s: query not cacheable because of attrs without values in DN \"%s\" (%s)\n",
|
||||||
|
op->o_log_prefix, rs->sr_entry->e_name.bv_val,
|
||||||
|
a->a_desc->ad_cname.bv_val );
|
||||||
|
goto over;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( si->count < si->max ) {
|
if ( si->count < si->max ) {
|
||||||
si->count++;
|
si->count++;
|
||||||
e = entry_dup( rs->sr_entry );
|
e = entry_dup( rs->sr_entry );
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue