From: Aki Tuomi Date: Tue, 26 Mar 2024 12:13:42 +0000 (+0200) Subject: auth: mech-oauth2 - Use the iterated passdb in oauth2_find_oidc_url() X-Git-Tag: 2.3.21.1~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=57ee018642c69b47abab7df088be70d1dcfad303;p=thirdparty%2Fdovecot%2Fcore.git auth: mech-oauth2 - Use the iterated passdb in oauth2_find_oidc_url() Fixes a crash when oauth2 passdb is not first. Broken in 59647f483c49c9e54c43cade168bf10f44a49292 --- diff --git a/src/auth/mech-oauth2.c b/src/auth/mech-oauth2.c index dae563291d..fc6224824e 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;