From 0e2b26986e83fc44a764fc9c9fbe1c728abfd8f4 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Wed, 1 Feb 2006 21:53:58 +0000 Subject: [PATCH] do not assume the matching rule synta has a validate handler (ITS#4380) --- servers/slapd/value.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 ) { -- 2.39.5