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
atob
should throw an error if the input is not correctly encoded
#42646
Labels
Comments
zloirock
added a commit
to zloirock/core-js
that referenced
this issue
Apr 8, 2022
I'd be happy to take a look at this one and open a PR! |
Thanks for volunteering @austinkelleher, PR’s welcome :) |
austinkelleher
added a commit
to austinkelleher/node
that referenced
this issue
Apr 8, 2022
The specification of `atob` has various different conditions that we need to abide by. The specific changes that were made: * `atob` now immediately throws when `undefined`, `false`, or a `number` is supplied * `atob` now strips ASCII whitespace before attempting to decode * `atob` now validates that the code point's length divided by 4 leaves a remainder that is not 1 See: https://infra.spec.whatwg.org/#forgiving-base64-decode Fixes: nodejs#42646
austinkelleher
added a commit
to austinkelleher/node
that referenced
this issue
Apr 8, 2022
The specification of `atob` has various different conditions that we need to abide by. The specific changes that were made: * `atob` now immediately throws when `undefined`, `false`, or a `number` is supplied * `atob` now strips ASCII whitespace before attempting to decode * `atob` now validates that the code point's length divided by 4 leaves a remainder that is not 1 See: https://infra.spec.whatwg.org/#forgiving-base64-decode Fixes: nodejs#42646
austinkelleher
added a commit
to austinkelleher/node
that referenced
this issue
Apr 8, 2022
The specification of `atob` has various different conditions that we need to abide by. The specific changes that were made: * `atob` now immediately throws when `undefined`, `false`, or a `number` is supplied * `atob` now strips ASCII whitespace before attempting to decode * `atob` now validates that the code point's length divided by 4 leaves a remainder that is not 1 See: https://infra.spec.whatwg.org/#forgiving-base64-decode Fixes: nodejs#42646
austinkelleher
added a commit
to austinkelleher/node
that referenced
this issue
Apr 9, 2022
The specification of `atob` has various different conditions that we need to abide by. The specific changes that were made: * `atob` now immediately throws when `undefined`, `false`, or a `number` is supplied * `atob` now strips ASCII whitespace before attempting to decode * `atob` now validates that the code point's length divided by 4 leaves a remainder that is not 1 See: https://infra.spec.whatwg.org/#forgiving-base64-decode Fixes: nodejs#42646
aduh95
pushed a commit
that referenced
this issue
Apr 12, 2022
This commit fixes a few inconsistencies between Node.js `atob` implementation and the WHATWG spec. Refs: https://infra.spec.whatwg.org/#forgiving-base64-decode Fixes: #42646 PR-URL: #42662 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
vmoroz
pushed a commit
to vmoroz/node
that referenced
this issue
Apr 13, 2022
This commit fixes a few inconsistencies between Node.js `atob` implementation and the WHATWG spec. Refs: https://infra.spec.whatwg.org/#forgiving-base64-decode Fixes: nodejs#42646 PR-URL: nodejs#42662 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
xtx1130
pushed a commit
to xtx1130/node
that referenced
this issue
Apr 25, 2022
This commit fixes a few inconsistencies between Node.js `atob` implementation and the WHATWG spec. Refs: https://infra.spec.whatwg.org/#forgiving-base64-decode Fixes: nodejs#42646 PR-URL: nodejs#42662 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
juanarbol
pushed a commit
that referenced
this issue
May 31, 2022
This commit fixes a few inconsistencies between Node.js `atob` implementation and the WHATWG spec. Refs: https://infra.spec.whatwg.org/#forgiving-base64-decode Fixes: #42646 PR-URL: #42662 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
targos
pushed a commit
that referenced
this issue
Sep 16, 2022
This commit fixes a few inconsistencies between Node.js `atob` implementation and the WHATWG spec. Refs: https://infra.spec.whatwg.org/#forgiving-base64-decode Fixes: #42646 PR-URL: #42662 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
juanarbol
pushed a commit
that referenced
this issue
Oct 10, 2022
This commit fixes a few inconsistencies between Node.js `atob` implementation and the WHATWG spec. Refs: https://infra.spec.whatwg.org/#forgiving-base64-decode Fixes: #42646 PR-URL: #42662 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
juanarbol
pushed a commit
that referenced
this issue
Oct 11, 2022
This commit fixes a few inconsistencies between Node.js `atob` implementation and the WHATWG spec. Refs: https://infra.spec.whatwg.org/#forgiving-base64-decode Fixes: #42646 PR-URL: #42662 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
guangwong
pushed a commit
to noslate-project/node
that referenced
this issue
Jan 3, 2023
This commit fixes a few inconsistencies between Node.js `atob` implementation and the WHATWG spec. Refs: https://infra.spec.whatwg.org/#forgiving-base64-decode Fixes: nodejs/node#42646 PR-URL: nodejs/node#42662 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
guangwong
pushed a commit
to noslate-project/node
that referenced
this issue
Jan 3, 2023
This commit fixes a few inconsistencies between Node.js `atob` implementation and the WHATWG spec. Refs: https://infra.spec.whatwg.org/#forgiving-base64-decode Fixes: nodejs/node#42646 PR-URL: nodejs/node#42662 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Version
17.9.0
Platform
MacOS 12.2
Subsystem
global / buffer
What steps will reproduce the bug?
No response
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
What do you see instead?
Additional information
https://infra.spec.whatwg.org/#forgiving-base64-decode step 3
Related to #42539 / #42530 @aduh95
The text was updated successfully, but these errors were encountered: