BinaryDecode fails when decoding strings with = at end

Description

Coldfusion 9 and 10, and Railo 4.2 are all happy with the following, as is the decoder at https://www.base64decode.org/;

BinaryDecode("aWQ9QkEtMzU3OSZ5PTIwMDEmbT1EQUtPVEEmeW1zPVBQJnVyZ2lkPU5ZMDImdmluPTNEN0hBMThONzJHMTc3Njg2=", "base64")

Any number of = can be place at the end and they still happily decode the string.

Lucee is throwing error 'can't decode the base64 input string [...], because the input string has an invalid length'. It will work only if you remove the '='. Obviously this is a simple fix so not a serious bug but could affect inter-system operability

Environment

Centos 6.7, Apache 2.2.15

Activity

Show:
Fixed

Details

Assignee

Reporter

Priority

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Affects versions

Created 9 October 2015 at 13:18
Updated 6 July 2022 at 07:39
Resolved 26 February 2018 at 18:40

Flag notifications