From: Pierangelo Masarati Date: Tue, 11 Nov 2008 18:01:35 +0000 (+0000) Subject: eat all the substrings assertion if the attribute type does not support substrings... X-Git-Tag: ACLCHECK_0~1129 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=21264e2cb8ea5230f4e12341681913392e7bea3a;p=openldap eat all the substrings assertion if the attribute type does not support substrings matching (ITS#5803) --- diff --git a/servers/slapd/filter.c b/servers/slapd/filter.c index bf855f5734..fd6af57c6d 100644 --- a/servers/slapd/filter.c +++ b/servers/slapd/filter.c @@ -385,6 +385,19 @@ get_ssa( rc = LDAP_PROTOCOL_ERROR; + if ( ssa.sa_desc->ad_type->sat_substr == NULL ) { + for ( tag = ber_first_element( ber, &len, &last ); + tag != LBER_DEFAULT; + tag = ber_next_element( ber, &len, last ) ) + { + /* eat all */ + rc = ber_scanf( ber, "x" ); + } + + rc = LDAP_INVALID_SYNTAX; + goto return_error; + } + for ( tag = ber_first_element( ber, &len, &last ); tag != LBER_DEFAULT; tag = ber_next_element( ber, &len, last ) )