cloudworker
cloudworker copied to clipboard
atob() failure behaviour different to cloudflare behaviour
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: https://github.com/dollarshaveclub/cloudworker/pull/90