Skip to content
Snippets Groups Projects
Commit e91e20e9 authored by Yoan VALLET's avatar Yoan VALLET
Browse files

Decode uri on auth_old endpoint

parent 82a511ff
Branches
No related tags found
No related merge requests found
Pipeline #5396 passed
......@@ -106,8 +106,11 @@ func main() {
fmt.Println("No host found")
}
state := string([]byte(pageState[0:splitIndex]))
host := string([]byte(pageState[splitIndex+1:len(pageState)]))
host = url.QueryUnescape(host)
encodedHost := string([]byte(pageState[splitIndex+1:len(pageState)]))
host, err := url.QueryUnescape(encodedHost)
if err != nil {
fmt.Println("Host cannot be decoded")
}
redir := host + "?code=" + pageCode + "&state="+ state +"&usage_point_id=" + pageUsage
fmt.Println(time.Now().Format("2006-01-02 15:04:05"), "- Redirect to -", redir)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment