Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log the entire body if non-OK fills up disk quickly #306

Open
jqmichael opened this issue Jun 8, 2021 · 2 comments · May be fixed by #376
Open

Log the entire body if non-OK fills up disk quickly #306

jqmichael opened this issue Jun 8, 2021 · 2 comments · May be fixed by #376

Comments

@jqmichael
Copy link

jqmichael commented Jun 8, 2021

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)	
       }
}
@ericchiang
Copy link
Collaborator

If you'd like to send a PR to limit the amount of information read, happy to take it!

@mason-liu
Copy link

mason-liu commented Apr 22, 2022

@ericchiang Any suggestion for the limit? Or if the body size reaches out threshold just ignore the body?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants