Skip to content

Commit bb29f41

Browse files
remyleoneutafrali
andauthored
fix(login): properly encode redirect URL (#5487)
Co-authored-by: ugurtafrali <tafraliugur@gmail.com>
1 parent 96a4e46 commit bb29f41

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/namespaces/login/login.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"encoding/base64"
66
"encoding/json"
77
"fmt"
8+
"net/url"
89
"reflect"
910
"time"
1011

@@ -72,7 +73,9 @@ Once you connected to Scaleway, the profile should be configured.
7273

7374
callbackURL := fmt.Sprintf("http://localhost:%d/callback", wb.Port())
7475

75-
accountURL := "https://account.scaleway.com/authenticate?redirectToUrl=" + callbackURL
76+
params := url.Values{}
77+
params.Add("redirectToUrl", callbackURL)
78+
accountURL := "https://account.scaleway.com/authenticate?" + params.Encode()
7679

7780
logger.Debugf("Web server started, waiting for callback on %s\n", callbackURL)
7881

0 commit comments

Comments
 (0)