]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: mech-oauth2 - Don't send payload for internal error
authorStephan Bosch <stephan.bosch@open-xchange.com>
Tue, 31 Oct 2023 16:08:28 +0000 (17:08 +0100)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Tue, 2 Sep 2025 05:25:53 +0000 (05:25 +0000)
src/auth/mech-oauth2.c

index 31778e445dad4eb19d7c312a1001d1f13c7ea401..ec48f72ea8689036f3225c1b6b91d529a7798e73 100644 (file)
@@ -83,8 +83,7 @@ oauth2_verify_callback(enum passdb_result result,
 
        switch (result) {
        case PASSDB_RESULT_INTERNAL_FAILURE:
-               /* Non-standard response */
-               oauth2_fail(oauth2_req, 500, "internal_failure");
+               auth_request_internal_failure(request);
                break;
        case PASSDB_RESULT_USER_DISABLED:
        case PASSDB_RESULT_PASS_EXPIRED:
@@ -227,7 +226,7 @@ mech_oauthbearer_auth_continue(struct auth_request *request,
 
        if (oauth2_req->db == NULL) {
                e_error(request->event, "BUG: oauth2 database missing");
-               oauth2_fail(oauth2_req, 500, "internal_failure");
+               auth_request_internal_failure(request);
                return;
        }
        if (data_size == 0) {
@@ -331,7 +330,7 @@ mech_xoauth2_auth_continue(struct auth_request *request,
 
        if (oauth2_req->db == NULL) {
                e_error(request->event, "BUG: oauth2 database missing");
-               oauth2_fail(oauth2_req, 500, "internal_failure");
+               auth_request_internal_failure(request);
                return;
        }
        if (data_size == 0) {