]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: mech-oauth2 - Fix segfault occurring when oauth2 passdb is not first
authorStephan Bosch <stephan.bosch@open-xchange.com>
Fri, 3 Nov 2023 00:28:05 +0000 (01:28 +0100)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 17 Nov 2023 10:49:10 +0000 (10:49 +0000)
src/auth/mech-oauth2.c

index baee7f583abbbb1f856ff482768936d9b1f2ad78..b0da67cea8cb63bc003b6579c3e76c42a22ddf3d 100644 (file)
@@ -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;