File tree 2 files changed +3
-9
lines changed
2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import (
11
11
"errors"
12
12
"io"
13
13
"net/http"
14
- "net/url"
15
14
16
15
"github.com/coreos/go-oidc/v3/oidc"
17
16
"github.com/gitpod-io/gitpod/common-go/log"
@@ -104,15 +103,11 @@ func (service *OIDCService) GetClientConfigFromRequest(r *http.Request) (*OIDCCl
104
103
return nil , errors .New ("issuer param not specified" )
105
104
}
106
105
log .WithField ("issuerParam" , issuerParam ).Trace ("GetClientConfigFromRequest" )
107
- issuer , err := url .QueryUnescape (issuerParam )
108
- if err != nil {
109
- return nil , errors .New ("bad issuer param" )
110
- }
111
- log .WithField ("issuer" , issuer ).Trace ("at GetClientConfigFromRequest" )
106
+ log .WithField ("issuer" , issuerParam ).Trace ("at GetClientConfigFromRequest" )
112
107
113
108
for id , value := range service .configsById {
114
109
log .WithField ("issuer" , value .Issuer ).WithField ("id" , id ).Trace ("GetClientConfigFromRequest (candidate)" )
115
- if value .Issuer == issuer {
110
+ if value .Issuer == issuerParam {
116
111
return value , nil
117
112
}
118
113
}
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import (
10
10
"log"
11
11
"net/http"
12
12
"net/http/httptest"
13
- "net/url"
14
13
"testing"
15
14
16
15
"github.com/coreos/go-oidc/v3/oidc"
@@ -72,7 +71,7 @@ func TestGetClientConfigFromRequest(t *testing.T) {
72
71
ExpectedId : "" ,
73
72
},
74
73
{
75
- Location : "/start?issuer=" + url . QueryEscape ( issuer ) ,
74
+ Location : "/start?issuer=" + issuer ,
76
75
ExpectedError : false ,
77
76
ExpectedId : "google-1" ,
78
77
},
You can’t perform that action at this time.
0 commit comments