From 5ae9bb4df9af6eea994e784f8656108d1e14fa3d Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 15 Oct 2025 13:40:31 +0800 Subject: [PATCH] Fix a bug missed return (#35655) (#35667) Backport #35655 by @lunny Co-authored-by: Lunny Xiao --- routers/web/auth/oauth2_provider.go | 1 + 1 file changed, 1 insertion(+) diff --git a/routers/web/auth/oauth2_provider.go b/routers/web/auth/oauth2_provider.go index 79989d8fbe..1dc40d6a75 100644 --- a/routers/web/auth/oauth2_provider.go +++ b/routers/web/auth/oauth2_provider.go @@ -636,6 +636,7 @@ func handleAuthorizationCode(ctx *context.Context, form forms.AccessTokenForm, s ErrorCode: oauth2_provider.AccessTokenErrorCodeInvalidRequest, ErrorDescription: "cannot proceed your request", }) + return } resp, tokenErr := oauth2_provider.NewAccessTokenResponse(ctx, authorizationCode.Grant, serverKey, clientKey) if tokenErr != nil {