mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
ITS#1681 - detect bad filter in slap_parseURI() - from Hallvard Furuseth
This commit is contained in:
parent
c22f10f4ca
commit
f516e34918
@ -84,12 +84,16 @@ is_dn: bv.bv_len = uri->bv_len - (bv.bv_val - uri->bv_val);
|
||||
/* Grab the filter */
|
||||
if ( ludp->lud_filter ) {
|
||||
*filter = str2filter( ludp->lud_filter );
|
||||
if ( *filter == NULL )
|
||||
rc = LDAP_PROTOCOL_ERROR;
|
||||
}
|
||||
|
||||
/* Grab the searchbase */
|
||||
bv.bv_val = ludp->lud_dn;
|
||||
bv.bv_len = strlen( bv.bv_val );
|
||||
rc = dnNormalize2( NULL, &bv, searchbase );
|
||||
if ( rc == LDAP_URL_SUCCESS ) {
|
||||
bv.bv_val = ludp->lud_dn;
|
||||
bv.bv_len = strlen( bv.bv_val );
|
||||
rc = dnNormalize2( NULL, &bv, searchbase );
|
||||
}
|
||||
|
||||
ldap_free_urldesc( ludp );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user