urlDecode behaves differently on Lucee 5 and Lucee 6

This works on Lucee 5

dump(urldecode(“(lebensmittel)&rank.by=id%3A5425152&rows=100&rank.mm=30%”));

On Lucee 6 it throws an error:
Invalid URL encoding in string [(lebensmittel)&rank.by=id%3A5425152&rows=100&rank.mm=30%] on line 3

ok, so this doesn’t work on Lucee 6

<cfscript>

dump(urldecode("mm=3%"));
</cfscript>

Yeah that’s simply invalid, % needs to be encoded in a url, the decoder is expecting something like %25

With Lucee 6, we switched to a standard Apache commons encoder which resolved many other issues relating to encoding / decoding

3 Likes

I’m fine with fixing our code (this part is quite old), but it worked in v5,. If v6 is more strict, then it should be mentioned somewhere? Or I missed it in the upgrade notes

this is v5

1 Like

docs updated

3 Likes