mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-01 14:15:49 +08:00
Validate filter and compare inputs
This commit is contained in:
parent
a71cd15182
commit
faa9956446
@ -63,7 +63,8 @@ get_ava(
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = value_normalize( aa->aa_desc, usage, &value, &aa->aa_value, text );
|
||||
rc = value_validate_normalize( aa->aa_desc, usage,
|
||||
&value, &aa->aa_value, text );
|
||||
|
||||
if( rc != LDAP_SUCCESS ) {
|
||||
ch_free( aa );
|
||||
|
@ -136,7 +136,8 @@ do_compare(
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
rc = value_normalize( ava.aa_desc, SLAP_MR_EQUALITY, &value, &ava.aa_value, &text );
|
||||
rc = value_validate_normalize( ava.aa_desc, SLAP_MR_EQUALITY,
|
||||
&value, &ava.aa_value, &text );
|
||||
if( rc != LDAP_SUCCESS ) {
|
||||
send_ldap_result( conn, op, rc, NULL, text, NULL, NULL );
|
||||
goto cleanup;
|
||||
|
@ -534,8 +534,15 @@ get_substring_filter(
|
||||
goto return_error;
|
||||
}
|
||||
|
||||
rc = value_normalize( f->f_sub_desc, usage, &value, &bv, text );
|
||||
/* valiate using equality matching rule validator! */
|
||||
rc = value_validate( f->f_sub_desc->ad_type->sat_equality,
|
||||
&value, text );
|
||||
if( rc != LDAP_SUCCESS ) {
|
||||
goto return_error;
|
||||
}
|
||||
|
||||
rc = value_normalize( f->f_sub_desc, usage,
|
||||
&value, &bv, text );
|
||||
if( rc != LDAP_SUCCESS ) {
|
||||
goto return_error;
|
||||
}
|
||||
|
@ -166,7 +166,8 @@ get_mra(
|
||||
* OK, if no matching rule, normalize for equality, otherwise
|
||||
* normalize for the matching rule.
|
||||
*/
|
||||
rc = value_normalize( ma->ma_desc, SLAP_MR_EQUALITY, &value, &ma->ma_value, text );
|
||||
rc = value_validate_normalize( ma->ma_desc, SLAP_MR_EQUALITY,
|
||||
&value, &ma->ma_value, text );
|
||||
|
||||
if( rc != LDAP_SUCCESS ) {
|
||||
mra_free( ma, 1 );
|
||||
|
Loading…
Reference in New Issue
Block a user