Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Add padded base64url payload string#60

Closed
TAOXUY wants to merge 2 commits intogoogle:masterfrom
TAOXUY:base64urlPadding
Closed

Add padded base64url payload string#60
TAOXUY wants to merge 2 commits intogoogle:masterfrom
TAOXUY:base64urlPadding

Conversation

@TAOXUY
Copy link
Copy Markdown

@TAOXUY TAOXUY commented Jan 18, 2021

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.

@TAOXUY
Copy link
Copy Markdown
Author

TAOXUY commented Jan 18, 2021

@qiwzhang, @nareddyt

@TAOXUY
Copy link
Copy Markdown
Author

TAOXUY commented Jan 18, 2021

Copy link
Copy Markdown
Contributor

@qiwzhang qiwzhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@TAOXUY TAOXUY closed this Feb 10, 2021
@TAOXUY
Copy link
Copy Markdown
Author

TAOXUY commented Feb 10, 2021

Replace with PR in envoy

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants