]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Don't do cache lookup on internal passdb failure when passdb_use_cache=no
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 22 Oct 2025 08:00:56 +0000 (11:00 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Wed, 22 Oct 2025 10:13:49 +0000 (10:13 +0000)
This was the only place where passdb_cache_lookup_credentials() caller didn't
already check for key=NULL.

src/auth/passdb-cache.c

index 269ce49248afc7a1ae526ef03b9b5e0f4c713812..c378e538c023c2451a302292cd200516b5acdcea 100644 (file)
@@ -161,7 +161,7 @@ bool passdb_cache_lookup_credentials(struct auth_request *request,
        struct auth_cache_node *node;
        bool neg_expired;
 
-       if (passdb_cache == NULL)
+       if (passdb_cache == NULL || key == NULL)
                return FALSE;
 
        if (!passdb_cache_lookup(request, key, use_expired,