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

Remove underscore from base64DecodeTable #40

Merged
merged 2 commits into from
May 3, 2024

Conversation

primoly
Copy link
Contributor

@primoly primoly commented Apr 28, 2024

Fixes #36

@tschneidereit
Copy link
Member

Thank you for this, @primoly! Can you say why this is the right fix? I think it is, based on the table Firefox uses, but would feel better if you gave a rationale for this change that we can then check.

@primoly
Copy link
Contributor Author

primoly commented Apr 28, 2024

It’s specified in the table in Base 64 Encoding (Table 1: The Base 64 Alphabet) which does not contain the underscore character (ASCII 95).

Copy link
Contributor

@guybedford guybedford left a comment

Choose a reason for hiding this comment

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

Can you add the test for this at the end of https://github.com/bytecodealliance/StarlingMonkey/blob/main/tests/integration/btoa/btoa.js demonstrating:

throws(() => atob("__"));

@primoly primoly requested a review from guybedford April 29, 2024 19:12
@tschneidereit tschneidereit merged commit 76f2a16 into bytecodealliance:main May 3, 2024
1 check passed
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.

atob inconsistency
3 participants