go-oidc icon indicating copy to clipboard operation
go-oidc copied to clipboard

limit the size of the logged response to 2048 bytes in error cases

Open drakkan opened this issue 2 years ago • 0 comments

Fixes #306

Maybe we should also limit the size while reading the body itself, currently we have

body, err := ioutil.ReadAll(resp.Body)

we could do instead

body, err := ioutil.ReadAll(io.LimitReader(resp.Body, 262144))

drakkan avatar Apr 25 '23 07:04 drakkan