]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
ldap: When using the same LDAP attribute multiple times, give an error message.
authorTimo Sirainen <tss@iki.fi>
Tue, 12 May 2009 17:45:37 +0000 (13:45 -0400)
committerTimo Sirainen <tss@iki.fi>
Tue, 12 May 2009 17:45:37 +0000 (13:45 -0400)
--HG--
branch : HEAD

src/auth/db-ldap.c

index 7c5aceb2e5e8128638fe7f14ab5d9b111d2d6a1d..83660b264ac0436917bc186bba5a14361d3982d1 100644 (file)
@@ -950,6 +950,10 @@ void db_ldap_set_attrs(struct ldap_connection *conn, const char *attrlist,
 
                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;
                }