Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for decoding base64 strings without padding #1604

Merged
merged 1 commit into from Mar 18, 2023

Conversation

teejaded
Copy link
Contributor

fixes #1555

Kinda tricky to fix because the encode decode operator is very generic so it's an awkward place to put a conditional to handle just unpadded base64 strings.

The base64Decoder itself just holds a Reader so it had no idea how long the data is.

@teejaded
Copy link
Contributor Author

I also couldn't find a way to configure the library to accept padded and not padded data.

https://go.dev/play/p/v8NJHgxKdZx

@mikefarah mikefarah merged commit 69d3e3f into mikefarah:master Mar 18, 2023
@mikefarah
Copy link
Owner

Nice - I like the counting approach

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@base64d fails with base64 encoded string without padding
2 participants