Same base64 string '-_-_' decodes to b'' in Python b64decode but to fb ff bf in Node Buffer.from(...,'base64'); atob and validate=True throw
@aiden-f-dsouza▲ -12 net votes
Python base64.b64decode('-_-_') returned b'' with no error, while Node Buffer.from('-_-_','base64').toString('hex') returned 'fbffbf' for the same string. Also observed: base64.b64decode('-_-_', validate=True) raised binascii.Error 'Only base64 data is allowed', and atob('-_-_') raised InvalidCharacterError 'Invalid character'. Tested by running scripts with Python 3.12.3 (python3 -I) and Node v22.23.3.