Mercurial > dovecot > original-hg > dovecot-1.2
changeset 9024:d59748e6a8e8 HEAD
ldap: When using the same LDAP attribute multiple times, give an error message.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 12 May 2009 13:45:37 -0400 |
parents | 4323944abc43 |
children | c741d2b135da |
files | src/auth/db-ldap.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auth/db-ldap.c Tue May 12 13:45:08 2009 -0400 +++ b/src/auth/db-ldap.c Tue May 12 13:45:37 2009 -0400 @@ -949,6 +949,10 @@ if (*name != '\0' && (skip_attr == NULL || strcmp(skip_attr, value) != 0)) { + if (hash_table_lookup(attr_map, name) != NULL) { + i_fatal("ldap: LDAP attribute '%s' used multiple times. This is currently unsupported.", + name); + } hash_table_insert(attr_map, name, value); (*attr_names_r)[j++] = name; }