This repository was archived by the owner on Jul 16, 2025. It is now read-only.
Closed
Conversation
Author
Author
qiwzhang
suggested changes
Jan 19, 2021
Contributor
qiwzhang
left a comment
There was a problem hiding this comment.
No, I don't want such paddling code in this library. This is library is for jwt verification, it doesn't need such padding code. It may cause confusing.
Such padding is required by http header when copying to it. let us do such simple paddling in the envoy jwt_authn.
Author
|
Replace with PR in envoy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR provides the base64url payload string with padding.
Risk: low. Just like the added unit tests, the new one with padding should be equivalent to the original one after decoding. Of course, only the original one can be used in the JWT verification.
Context: although padding is not required by base64 encoding spec, some decode libraries are not robust enough to handle the one without padding.