Use URLEncoding instead of StdEncoding to be sure state value will be corectly decoded (#10512)

This commit is contained in:
m-pavel 2018-01-15 10:49:30 +03:00 committed by Torkel Ödegaard
parent baffdb156e
commit dff66559e4

View File

@ -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) {