When I run below piece of code on latest version (at least on 188.8.131.52), its being Ignored the encoded string length and giving partial decoded strings. But the older version throws an error while decoding.base_64 = ToBase64("I am a string."); binary_data = ToBinary(base_64); encoded_binary = BinaryEncode(binary_data, "base64"); writedump(encoded_binary); //SSBhbSBhIHN0cmluZy4= encoded_binary = 'SSBhbSBhIHN0cmluZy'; writedump(tostring(BinaryDecode(encoded_binary, "base64")));
This was a known issue in lucee.
And Already fixed from lucee 184.108.40.206-SNAPSHOT by adding a new argument precise to binaryDecode(). So please use precise = true in binaryDecode().
Note: there is a regression in encrypt function on the precise argument, the ticket is already in QA status [LDEV-4101] - Lucee.