Skip to content
This repository has been archived by the owner on Jul 15, 2021. It is now read-only.

Commit

Permalink
use base64.URLEncode to make state url safe
Browse files Browse the repository at this point in the history
  • Loading branch information
st0ne-dot-at committed Dec 18, 2020
1 parent dcdee42 commit 6c421c5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/gangway/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
htmltemplate "html/template"
"io/ioutil"
"net/http"
"net/url"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -167,7 +166,7 @@ func loginHandler(w http.ResponseWriter, r *http.Request) {

b := make([]byte, 32)
rand.Read(b)
state := url.QueryEscape(base64.StdEncoding.EncodeToString(b))
state := base64.URLEncoding.EncodeToString(b)

session, err := gangwayUserSession.Session.Get(r, "gangway")
if err != nil {
Expand Down

0 comments on commit 6c421c5

Please sign in to comment.