]> git.sur5r.net Git - openldap/commitdiff
ITS#6570 part #2, reject RDNs with empty values
authorHoward Chu <hyc@openldap.org>
Sun, 6 Jun 2010 23:22:07 +0000 (23:22 +0000)
committerHoward Chu <hyc@openldap.org>
Sun, 6 Jun 2010 23:22:07 +0000 (23:22 +0000)
servers/slapd/dn.c

index e898942501035a726be802284612330158e4ff05..5b1adbf6da626130ada9b5dce0bc53dd2a685751 100644 (file)
@@ -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;