From: Timo Sirainen Date: Wed, 22 Oct 2025 08:01:48 +0000 (+0300) Subject: auth: Add assert to make sure NULL cache key isn't tried to be expanded X-Git-Tag: 2.4.2~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7cf4add532a449d9185c8e7f5dde1b4b22cf435c;p=thirdparty%2Fdovecot%2Fcore.git auth: Add assert to make sure NULL cache key isn't tried to be expanded --- diff --git a/src/auth/auth-cache.c b/src/auth/auth-cache.c index 82cc0d526e..2f875ac45e 100644 --- a/src/auth/auth-cache.c +++ b/src/auth/auth-cache.c @@ -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}",