Skip to content

Commit

Permalink
github: strip querystring from returned URL
Browse files Browse the repository at this point in the history
Previously we would leak credentials to error logs.

Fixes github-release#85.
  • Loading branch information
kevinburke committed Oct 20, 2020
1 parent a2845f0 commit e7e5226
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ func (c Client) getPaginated(uri string) (io.ReadCloser, error) {
for resp := range responses {
if resp.StatusCode != http.StatusOK {
resp.Body.Close()
w.CloseWithError(fmt.Errorf("expected '200 OK' but received '%v' (url: %s)", resp.Status, resp.Request.URL))
w.CloseWithError(fmt.Errorf("expected '200 OK' but received '%v' (%s to %s)", resp.Status, resp.Request.Method, resp.Request.URL.Path))
return
}
_, err := io.Copy(w, resp.Body)
Expand Down

0 comments on commit e7e5226

Please sign in to comment.