From 007cd13010e3c7bf6fdbf63aca7accf01f5076b6 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 6 Jun 2010 23:22:07 +0000 Subject: [PATCH] ITS#6570 part #2, reject RDNs with empty values --- servers/slapd/dn.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/servers/slapd/dn.c b/servers/slapd/dn.c index e898942501..5b1adbf6da 100644 --- a/servers/slapd/dn.c +++ b/servers/slapd/dn.c @@ -379,6 +379,10 @@ LDAPRDN_rewrite( LDAPRDN rdn, unsigned flags, void *ctx ) ava->la_value = bv; ava->la_flags |= LDAP_AVA_FREE_VALUE; } + /* reject empty values */ + if (!ava->la_value.bv_len) { + return LDAP_INVALID_SYNTAX; + } } rc = LDAP_SUCCESS; -- 2.39.5