From ae3dae1ffaff036ec9bfdd9cf02137fed422272a Mon Sep 17 00:00:00 2001 From: "Gustavo \"Guz\" L. de Mello" Date: Wed, 24 Jul 2024 19:08:18 -0300 Subject: [PATCH] fix(oauth): escape json string so it can be set by http package --- internals/oauth/oauth.templ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internals/oauth/oauth.templ b/internals/oauth/oauth.templ index 041506c..cc854d0 100644 --- a/internals/oauth/oauth.templ +++ b/internals/oauth/oauth.templ @@ -125,7 +125,7 @@ func (c DefaultOAuthClient) ServeHTTP(w http.ResponseWriter, r *http.Request) { http.SetCookie(w, &http.Cookie{ Name: "__Host-OAUTH-" + strings.ToUpper(c.Name), - Value: string(cv), + Value: url.PathEscape(string(cv)), SameSite: http.SameSiteStrictMode, Path: "/", Secure: true,