From 92f51f9d679ba9dc3a2d697ffad92fb3f71ed56c Mon Sep 17 00:00:00 2001 From: Taylor Silva Date: Fri, 20 Mar 2026 07:16:10 -0400 Subject: [PATCH] fix non-constant format string in call to newRedirectedErr (#4671) Signed-off-by: Taylor Silva --- server/oauth2.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/oauth2.go b/server/oauth2.go index 3818c135..d4105591 100644 --- a/server/oauth2.go +++ b/server/oauth2.go @@ -509,8 +509,7 @@ func (s *Server) parseAuthorizationRequest(r *http.Request) (*storage.AuthReques } if codeChallenge != "" && !slices.Contains(s.pkce.CodeChallengeMethodsSupported, codeChallengeMethod) { - description := fmt.Sprintf("Unsupported PKCE challenge method (%q).", codeChallengeMethod) - return nil, newRedirectedErr(errInvalidRequest, description) + return nil, newRedirectedErr(errInvalidRequest, "Unsupported PKCE challenge method (%q).", codeChallengeMethod) } // Enforce PKCE if configured. @@ -599,8 +598,7 @@ func (s *Server) parseAuthorizationRequest(r *http.Request) (*storage.AuthReques } if rt.token { if redirectURI == redirectURIOOB { - err := fmt.Sprintf("Cannot use response type 'token' with redirect_uri '%s'.", redirectURIOOB) - return nil, newRedirectedErr(errInvalidRequest, err) + return nil, newRedirectedErr(errInvalidRequest, "Cannot use response type 'token' with redirect_uri '%s'.", redirectURIOOB) } }