From 98d47ac0a5a4f59416d3e7710c9328339eb45b8d Mon Sep 17 00:00:00 2001 From: Umputun Date: Sun, 13 May 2018 12:47:09 -0500 Subject: [PATCH] use correct xsrf for session --- app/rest/auth/provider.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/rest/auth/provider.go b/app/rest/auth/provider.go index 5e659027..cbf2b31d 100644 --- a/app/rest/auth/provider.go +++ b/app/rest/auth/provider.go @@ -177,7 +177,7 @@ func (p Provider) authHandler(w http.ResponseWriter, r *http.Request) { xsrfToken := p.randToken() session.Values["xsrf_token"] = xsrfToken - xsrfCookie := http.Cookie{Name: "XSRF-TOKEN", Value: p.randToken(), HttpOnly: false, Path: "/", + xsrfCookie := http.Cookie{Name: "XSRF-TOKEN", Value: xsrfToken, HttpOnly: false, Path: "/", MaxAge: 3600 * 24 * 365, Secure: true, } http.SetCookie(w, &xsrfCookie)