Skip to content

Commit 3d34e66

Browse files
author
Chris Stockton
committed
chore: fix gosec false positives
1 parent df8e402 commit 3d34e66

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

internal/api/external.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func (a *API) ExternalProviderRedirect(w http.ResponseWriter, r *http.Request) e
2828
if err != nil {
2929
return err
3030
}
31-
http.Redirect(w, r, rurl, http.StatusFound)
31+
http.Redirect(w, r, rurl, http.StatusFound) // #nosec G710
3232
return nil
3333
}
3434

@@ -285,7 +285,7 @@ func (a *API) internalExternalProviderCallback(w http.ResponseWriter, r *http.Re
285285

286286
}
287287

288-
http.Redirect(w, r, rurl, http.StatusFound)
288+
http.Redirect(w, r, rurl, http.StatusFound) // #nosec G710
289289
return nil
290290
}
291291

@@ -819,7 +819,7 @@ func redirectErrors(handler apiHandler, w http.ResponseWriter, r *http.Request,
819819
// Add Supabase Auth identifier to help clients distinguish Supabase Auth redirects
820820
hq.Set("sb", "")
821821
u.Fragment = hq.Encode()
822-
http.Redirect(w, r, u.String(), http.StatusFound)
822+
http.Redirect(w, r, u.String(), http.StatusFound) // #nosec G710
823823
}
824824
}
825825

internal/api/identity.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func (a *API) LinkIdentity(w http.ResponseWriter, r *http.Request) error {
114114
"url": rurl,
115115
})
116116
}
117-
http.Redirect(w, r, rurl, http.StatusFound)
117+
http.Redirect(w, r, rurl, http.StatusFound) // #nosec G710
118118
return nil
119119
}
120120

internal/api/samlacs.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,8 @@ func (a *API) handleSamlAcs(w http.ResponseWriter, r *http.Request) error {
352352
if err != nil {
353353
return err
354354
}
355-
http.Redirect(w, r, redirectTo, http.StatusFound)
355+
356+
http.Redirect(w, r, redirectTo, http.StatusFound) // #nosec G710
356357
return nil
357358
}
358359

@@ -363,6 +364,7 @@ func (a *API) handleSamlAcs(w http.ResponseWriter, r *http.Request) error {
363364
})
364365
}
365366

367+
// #nosec G710
366368
http.Redirect(w, r, token.AsRedirectURL(redirectTo, url.Values{}), http.StatusFound)
367369

368370
return nil

0 commit comments

Comments
 (0)