mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-12 15:23:11 -05:00
ITS#5211 spec says we must ignore invalid cookies
This commit is contained in:
parent
a6a51d86be
commit
005209bfe1
1 changed files with 6 additions and 2 deletions
|
|
@ -2840,10 +2840,14 @@ static int syncprov_parseCtrl (
|
|||
sr->sr_rhint = rhint;
|
||||
if (!BER_BVISNULL(&cookie)) {
|
||||
ber_dupbv_x( &sr->sr_state.octet_str, &cookie, op->o_tmpmemctx );
|
||||
/* If parse fails, pretend no cookie was sent */
|
||||
if ( slap_parse_sync_cookie( &sr->sr_state, op->o_tmpmemctx ) ||
|
||||
sr->sr_state.rid == -1 ) {
|
||||
rs->sr_text = "Sync control : cookie parsing error";
|
||||
return LDAP_PROTOCOL_ERROR;
|
||||
if ( sr->sr_state.ctxcsn ) {
|
||||
ber_bvarray_free_x( sr->sr_state.ctxcsn, op->o_tmpmemctx );
|
||||
sr->sr_state.ctxcsn = NULL;
|
||||
}
|
||||
sr->sr_state.numcsns = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue