From dff66559e4c4b8f2da4e70314b78b50d968d233a Mon Sep 17 00:00:00 2001 From: m-pavel Date: Mon, 15 Jan 2018 10:49:30 +0300 Subject: [PATCH] Use URLEncoding instead of StdEncoding to be sure state value will be corectly decoded (#10512) --- pkg/api/login_oauth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/api/login_oauth.go b/pkg/api/login_oauth.go index 847f09f0eb8..b63e3bfd89f 100644 --- a/pkg/api/login_oauth.go +++ b/pkg/api/login_oauth.go @@ -35,7 +35,7 @@ var ( func GenStateString() string { rnd := make([]byte, 32) rand.Read(rnd) - return base64.StdEncoding.EncodeToString(rnd) + return base64.URLEncoding.EncodeToString(rnd) } func OAuthLogin(ctx *middleware.Context) {