Skip to content

atob and btoa handle Symbol arguments incorrectly #196

Closed

Description

@dleviminzi

Here is another little bug. atob() and btoa() should throw TypeError when given a Symbol. On celld 0.4.1, they convert it to the string "Symbol()" and try to decode or encode that instead:

atob(Symbol()); // Throws InvalidCharacterError instead
btoa(Symbol()); // Returns "U3ltYm9sKCk=" — Base64 for "Symbol()"

Here is a patch

0001-Use-Web-IDL-string-conversion-in-atob-and-btoa.patch

Activity

  1. added a commit that references this issue on Sep 14, 2026
  2. added 4 commits that reference this issue on Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions