Thanks for the test scripts.

The base64 routines have been rewritten/tweaked/changed several times since the feature was added to accomodate user requests for changes in behaviour. Ironically, v6.35 passes your /decode_test. However, that implementation can no longer be used.

As with most technical features, I rarely implement algorithms like base64 from scratch because it is always better to use an implementation that is established, tested, conforms to RFCs, and so on.

I tried to find another implementation that passes your /decode_test and tested about twenty different c/c++ implementations from a variety of sources - they all failed. Also, most online decoders failed the test, apart from https://www.base64decode.org (although if you enable live mode, that fails as well). Even Microsoft's built-in API CryptBinaryToString() failed the test.

I eventually found one implementation that passes /decode_test. I will use that in the next beta. However, it is not clear what new side-effects this algorithm will have, so it will need testing, and we may have to revert to the current implementation if it does not work out.