From: Pierangelo Masarati Date: Wed, 1 Feb 2006 21:53:58 +0000 (+0000) Subject: do not assume the matching rule synta has a validate handler (ITS#4380) X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~254 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0e2b26986e83fc44a764fc9c9fbe1c728abfd8f4;p=openldap do not assume the matching rule synta has a validate handler (ITS#4380) --- diff --git a/servers/slapd/value.c b/servers/slapd/value.c index 9ccdf5c053..dbd30cff8f 100644 --- a/servers/slapd/value.c +++ b/servers/slapd/value.c @@ -153,8 +153,12 @@ int asserted_value_validate_normalize( rc = (mr->smr_syntax->ssyn_pretty)( mr->smr_syntax, in, &pval, ctx ); in = &pval; - } else { + } else if ( mr->smr_syntax->ssyn_validate ) { rc = (mr->smr_syntax->ssyn_validate)( mr->smr_syntax, in ); + + } else { + *text = "inappropriate matching request"; + return LDAP_INAPPROPRIATE_MATCHING; } if( rc != LDAP_SUCCESS ) {