Skip to content

Commit 6760013

Browse files
committed
[bug] Fix golangci-lint: actually copy URL
1 parent 48d4fbe commit 6760013

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pkg/api/controller.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -958,11 +958,9 @@ func (c *Controller) ReleaseTokenToMailbox(w http.ResponseWriter, r *http.Reques
958958
if c.handleAPIError(ctx, w, r, err) {
959959
return
960960
}
961-
thisURL := &*r.URL
962961
q := redirectURL.Query()
963-
q.Set("next", thisURL.String()) // Encode query-escapes this string.
962+
q.Set("next", r.URL.String()) // Encode query-escapes this string.
964963
redirectURL.RawQuery = q.Encode()
965-
c.Logger.WithContext(ctx).WithField("redirect", redirectURL.String()).Info("[DEBUG] redirect")
966964
w.Header().Set("Location", redirectURL.String())
967965
w.WriteHeader(http.StatusTemporaryRedirect)
968966
return

0 commit comments

Comments
 (0)