From: Stephan Bosch Date: Fri, 3 Nov 2023 00:28:05 +0000 (+0100) Subject: auth: mech-oauth2 - Fix segfault occurring when oauth2 passdb is not first X-Git-Tag: 2.4.0~2432 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f012fb6d6c93a31f4ee286aad12d680bab5f2543;p=thirdparty%2Fdovecot%2Fcore.git auth: mech-oauth2 - Fix segfault occurring when oauth2 passdb is not first --- diff --git a/src/auth/mech-oauth2.c b/src/auth/mech-oauth2.c index baee7f583a..b0da67cea8 100644 --- a/src/auth/mech-oauth2.c +++ b/src/auth/mech-oauth2.c @@ -26,7 +26,7 @@ static bool oauth2_find_oidc_url(struct auth_request *req, const char **url_r) for (; db != NULL; db = db->next) { if (strcmp(db->passdb->iface.name, "oauth2") == 0) { const char *url = - passdb_oauth2_get_oidc_url(req->passdb->passdb); + passdb_oauth2_get_oidc_url(db->passdb); if (url == NULL || *url == '\0') continue; *url_r = url;