You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, in ParseCredentialCreationResponseBody you can see:
varccrCredentialCreationResponseiferr=json.NewDecoder(body).Decode(&ccr); err!=nil {
returnnil, ErrBadRequest.WithDetails("Parse error for Registration").WithInfo(err.Error())
}
json.NewDecoder(r).Decode by itself is meant as a streaming parser and it does not fail on its own if there is trailing data after payload. I use such check in my own code to mitigate that.
This fixes an issue where the trailing data in the credential parsing functions would be ignored. This also adds some clarity documentation and cleanup to the ParseCredentialCreationResponse and ParseCredentialRequestResponseBody functions.
Fixes#189
Version
0.9.2
Description
For example, in
ParseCredentialCreationResponseBody
you can see:json.NewDecoder(r).Decode
by itself is meant as a streaming parser and it does not fail on its own if there is trailing data after payload. I use such check in my own code to mitigate that.Reproduction
N/A
Expectations
No response
Documentation
See: golang/go#36225
The text was updated successfully, but these errors were encountered: