]> git.sur5r.net Git - openldap/commitdiff
eat all the substrings assertion if the attribute type does not support substrings...
authorPierangelo Masarati <ando@openldap.org>
Tue, 11 Nov 2008 18:01:35 +0000 (18:01 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 11 Nov 2008 18:01:35 +0000 (18:01 +0000)
servers/slapd/filter.c

index bf855f573470b0994357c52840bb880e11ab1093..fd6af57c6d6f0e34565c755750c81ce495a09378 100644 (file)
@@ -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 ) )