Mercurial > dovecot > core-2.2
changeset 9265:b4dcdc5ccd8e 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 | 11b6aab8a203 |
children | e5f4cce3ef7a |
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 @@ -950,6 +950,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; }