]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: auth-cache - Treat cache key parsing errors as fatals
authorAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 25 Jul 2025 08:52:36 +0000 (11:52 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Fri, 1 Aug 2025 08:18:11 +0000 (08:18 +0000)
Avoids accidentically turning off caching

src/auth/auth-cache.c

index 407e5d4aa0edeba308b3f9162b6bf21103d2306a..be5693491824c3a5fff81408bc1f160d3f89444e 100644 (file)
@@ -147,10 +147,8 @@ char *auth_cache_parse_key_and_fields(pool_t pool, const char *query,
        char *cache_key;
        const char *error;
        if (auth_cache_parse_key_exclude(pool, query, exclude_driver,
-                                        &cache_key, &error) < 0) {
-               e_debug(auth_event, "auth-cache: %s", error);
-               cache_key = p_strdup(pool, "");
-       }
+                                        &cache_key, &error) < 0)
+               i_fatal("auth-cache: %s", error);
        return cache_key;
 }