]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Add assert to make sure NULL cache key isn't tried to be expanded
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 22 Oct 2025 08:01:48 +0000 (11:01 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Wed, 22 Oct 2025 10:13:49 +0000 (10:13 +0000)
src/auth/auth-cache.c

index 82cc0d526eb1fe02774b56ddc50972c71bec5226..2f875ac45eb18992f55070bca4346eb4d4d40e57 100644 (file)
@@ -354,6 +354,8 @@ auth_request_expand_cache_key(const struct auth_request *request,
        static bool error_logged = FALSE;
        const char *error;
 
+       i_assert(key != NULL);
+
        /* Uniquely identify the request's passdb/userdb with the P/U prefix
           and by "%{id}", which expands to the passdb/userdb ID number. */
        key = t_strconcat(request->userdb_lookup ? "U" : "P", "%{id}",