]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-dict-backend: dict-ldap - Ensure username is not null on priv lookups
authorAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 14 Feb 2024 08:12:10 +0000 (10:12 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Wed, 14 Feb 2024 17:26:29 +0000 (17:26 +0000)
src/lib-dict-backend/dict-ldap.c

index f65cbb321fa90b0b4ff5e47e0d0018957c998780..7868b0c3acdc32ba8943b4e2eaa44eaf611c8927 100644 (file)
@@ -204,6 +204,7 @@ ldap_dict_build_query(const struct dict_op_settings *set,
 
        t_array_init(&exp, 8);
        if (priv) {
+               i_assert(set->username != NULL);
                entry.key = '\0';
                entry.value = ldap_escape(set->username);
                entry.long_key = "username";