From 21264e2cb8ea5230f4e12341681913392e7bea3a Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 11 Nov 2008 18:01:35 +0000 Subject: [PATCH] eat all the substrings assertion if the attribute type does not support substrings matching (ITS#5803) --- servers/slapd/filter.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 ) ) -- 2.39.5