Skip to content

Commit

Permalink
fix: duplicate URL Encode on RelayState (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
coelho authored Oct 24, 2022
1 parent c69137a commit 80e4820
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions pkg/provider/logout_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"encoding/base64"
"encoding/xml"
"net/http"
"net/url"
"text/template"
"time"

Expand Down Expand Up @@ -57,7 +56,7 @@ func (r *LogoutResponse) sendBackLogoutResponse(w http.ResponseWriter, resp *sam
samlMessage := base64.StdEncoding.EncodeToString(xmlbuff.Bytes())

data := LogoutResponseForm{
RelayState: url.QueryEscape(r.RelayState),
RelayState: r.RelayState,
SAMLResponse: samlMessage,
LogoutURL: r.LogoutURL,
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/provider/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"encoding/base64"
"fmt"
"net/http"
"net/url"
"text/template"
"time"

Expand Down Expand Up @@ -55,7 +54,7 @@ func (r *Response) doResponse(request *http.Request, w http.ResponseWriter, resp
respData := base64.StdEncoding.EncodeToString([]byte(response))

data := AuthResponseForm{
url.QueryEscape(r.RelayState),
r.RelayState,
respData,
r.AcsUrl,
}
Expand Down

0 comments on commit 80e4820

Please sign in to comment.