go-oidc
go-oidc copied to clipboard
Log the entire body if non-OK fills up disk quickly
trafficstars
If OIDC page return non-OK status, the current behavior would log the body, which may fill up the disk if it's large enough.
https://github.com/coreos/go-oidc/blob/v3/oidc/oidc.go#L244-L246
Would it be OK not to log the body?
func (p *Provider) UserInfo
...
if resp.StatusCode != http.StatusOK {
return nil, fmt.Errorf("%s: %s", resp.Status, body)
}
}
If you'd like to send a PR to limit the amount of information read, happy to take it!
@ericchiang Any suggestion for the limit? Or if the body size reaches out threshold just ignore the body?