mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-30 03:29:35 -05:00
do not allow naming attribute repetitions in RDNs (ITS#5968)
This commit is contained in:
parent
e1fbf8b125
commit
34b34f6b63
1 changed files with 2 additions and 15 deletions
|
|
@ -250,21 +250,8 @@ AVA_Sort( LDAPRDN rdn, int nAVAs )
|
|||
ava_j = rdn[ j ];
|
||||
a = strcmp( ava_i->la_attr.bv_val, ava_j->la_attr.bv_val );
|
||||
|
||||
if ( a == 0 ) {
|
||||
int d;
|
||||
|
||||
d = ava_i->la_value.bv_len - ava_j->la_value.bv_len;
|
||||
|
||||
a = memcmp( ava_i->la_value.bv_val,
|
||||
ava_j->la_value.bv_val,
|
||||
d <= 0 ? ava_i->la_value.bv_len
|
||||
: ava_j->la_value.bv_len );
|
||||
|
||||
if ( a == 0 ) {
|
||||
a = d;
|
||||
}
|
||||
}
|
||||
/* Duplicates are not allowed */
|
||||
/* RFC4512 does not allow multiple AVAs
|
||||
* with the same attribute type in RDN (ITS#5968) */
|
||||
if ( a == 0 )
|
||||
return LDAP_INVALID_DN_SYNTAX;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue