denoland/celldPublic

self-hosted, distributed Durable Objects

atob and btoa should reject calls without an argument

DL

Here is the first of the additional little bugs we found. `atob()` and `btoa()` don't handle missing arguments correctly on celld 0.4.1. Both should throw `TypeError`:

```js atob(); // Throws InvalidCharacterError instead btoa(); // Returns "dW5kZWZpbmVk" — Base64 for "undefined" ```

Here is a patch:

[0001-Require-an-argument-for-atob-and-btoa.patch](https://github.com/user-attachments/files/32133773/0001-Require-an-argument-for-atob-and-btoa.patch)

  1. bartlomiejuclosedlast month on GitHub

  2. bartlomiejureferenced 9c2d299dd6ablast month on GitHub

  3. ryreferenced e519694581dclast month on GitHub

  4. ryreferenced 4250d366aceblast month on GitHub

  5. ryreferenced 3127cf8e307elast month on GitHub

  6. ryreferenced 12d5b6333fe5last month on GitHub