Skip to content
This repository was archived by the owner on Jun 6, 2024. It is now read-only.
This repository was archived by the owner on Jun 6, 2024. It is now read-only.

atob() failure behaviour different to cloudflare behaviour #126

@dan-overton

Description

@dan-overton

In version 0.1.2

If I run atob('123===') inside a cloudflare worker, I get an InvalidCharacterException with the message atob() called with invalid base64-encoded data. (Only whitespace, '+', '/', alphanumeric ASCII, and up to two terminal '=' signs when the input data length is divisible by 4 are allowed.)

Running this same script in cloudworker does not raise an exception. It seems to drop down to the 'atob' package, which runs Buffer.from('123===', 'base64').toString('binary');

Related PR: #90

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