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

atob() failure behaviour different to cloudflare behaviour #126

Open
dan-overton opened this issue Oct 16, 2019 · 0 comments
Open

atob() failure behaviour different to cloudflare behaviour #126

dan-overton opened this issue Oct 16, 2019 · 0 comments

Comments

@dan-overton
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant