ldap/servers/slapd/dn.c | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit bc7df12bbdeade5ba5115e5ea900d16ddd23c046 Author: Noriko Hosoi nhosoi@redhat.com Date: Tue Aug 31 13:57:04 2010 -0700
DN normalizer should check the invalid type
File: ldap/servers/slapd/dn.c Description: slapi_dn_normalize_ext failed to check a typical invald DN (e.g., "bogus,dc=example,dc=com"), in which RDN does not have the type=value format. The problem is fixed.
diff --git a/ldap/servers/slapd/dn.c b/ldap/servers/slapd/dn.c index a163fb3..54ddac1 100644 --- a/ldap/servers/slapd/dn.c +++ b/ldap/servers/slapd/dn.c @@ -564,6 +564,10 @@ slapi_dn_normalize_ext(char *src, size_t src_len, char **dest, size_t *dest_len) *d++ = *s++; } else if (ISSPACE(*s)) { state = B4EQUAL; /* skip a trailing space */ + } else if (ISQUOTE(*s) || SEPARATOR(*s)) { + /* type includes quote / separator; not a valid dn */ + rc = -1; + goto bail; } else { *d++ = *s++; }
389-commits@lists.fedoraproject.org