Include source of invalid base64 data in error messages #1469
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes:
Note for host-containers/bootstrap-containers: we don't save the output of restart-commands (including host-containers) today, so this is just to make sure we don't forget this if we do start to save it later.
Note for all of them: these shouldn't even be possible to hit with today's API protections, so again it's just being safe; see testing note...
Testing done:
These have the same problem, in that it's not really possible to hit the "invalid base64" error case without removing a bunch of protections in apiserver. The base64 has to be valid to be accepted in the first place, and has to be valid later on for the apiserver to deserialize it from disk and give it to these programs. Given the tiny changes and the strengths around this, I'm not sure it's worth ripping up everything else..?
I confirmed that it builds, tests pass, an AMI worked fine, admin and control host containers still worked fine.
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.