From e33860ce91b29b188a77e5a496e02f65c11d6526 Mon Sep 17 00:00:00 2001 From: primoly <168267431+primoly@users.noreply.github.com> Date: Sun, 28 Apr 2024 12:13:16 +0200 Subject: [PATCH 1/2] Remove underscore from base64DecodeTable --- builtins/web/base64.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtins/web/base64.cpp b/builtins/web/base64.cpp index ccd7d09..dfe0526 100644 --- a/builtins/web/base64.cpp +++ b/builtins/web/base64.cpp @@ -80,7 +80,7 @@ const uint8_t base64DecodeTable[128] = { /* 64 */ nonAlphabet, 0, 1, 2, 3, 4, 5, 6, /* 72 */ 7, 8, 9, 10, 11, 12, 13, 14, /* 80 */ 15, 16, 17, 18, 19, 20, 21, 22, - /* 88 */ 23, 24, 25, nonAlphabet, nonAlphabet, nonAlphabet, nonAlphabet, 63, + /* 88 */ 23, 24, 25, nonAlphabet, nonAlphabet, nonAlphabet, nonAlphabet, nonAlphabet, /* 96 */ nonAlphabet, 26, 27, 28, 29, 30, 31, 32, /* 104 */ 33, 34, 35, 36, 37, 38, 39, 40, /* 112 */ 41, 42, 43, 44, 45, 46, 47, 48, From c9ae4775c4ff5b8fefbc782cac45e9df6f4ba16b Mon Sep 17 00:00:00 2001 From: primoly <168267431+primoly@users.noreply.github.com> Date: Mon, 29 Apr 2024 20:52:28 +0200 Subject: [PATCH 2/2] Add atob underscore test --- tests/integration/btoa/btoa.js | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration/btoa/btoa.js b/tests/integration/btoa/btoa.js index 79ecf81..f9a543a 100644 --- a/tests/integration/btoa/btoa.js +++ b/tests/integration/btoa/btoa.js @@ -374,5 +374,6 @@ export const handler = serveTest(async () => { throws(() => atob("~~")); throws(() => atob("..")); throws(() => atob("--")); + throws(() => atob("__")); } });