Skip to content

Commit b1dd2d1

Browse files
committed
fix linter findings
1 parent 3a50bfb commit b1dd2d1

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

src/integration_tests/trafficcontroller/fake_uaa_server_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func (h *FakeUaaHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
2020
return
2121
}
2222

23-
token := r.FormValue("token")
23+
token := r.FormValue("token") //nolint:gosec
2424

2525
switch token {
2626
case "iAmAnAdmin":

src/rlp/app/rlp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type RLP struct {
5353

5454
// NewRLP returns a new unstarted RLP.
5555
func NewRLP(m MetricClient, opts ...RLPOption) *RLP {
56-
ctx, cancel := context.WithCancel(context.Background())
56+
ctx, cancel := context.WithCancel(context.Background()) //nolint:gosec
5757
rlp := &RLP{
5858
ingressAddrs: []string{"doppler.service.cf.internal"},
5959
ingressDialOpts: []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())},

src/trafficcontroller/internal/auth/uaa_client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ func (h *FakeUaaHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
147147
return
148148
}
149149

150-
token := r.FormValue("token")
150+
token := r.FormValue("token") //nolint:gosec
151151

152152
switch token {
153153
case "iAmAnAdmin":

src/trafficcontroller/internal/proxy/set_cookie_handler.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ func NewSetCookieHandler(domain string) *SetCookieHandler {
1313
}
1414

1515
func (h SetCookieHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
16+
r.Body = http.MaxBytesReader(w, r.Body, 1<<20) // limit request body to 1MB
1617
if err := r.ParseForm(); err != nil {
1718
w.WriteHeader(http.StatusBadRequest)
1819
return

0 commit comments

Comments
 (0)