Query param parsing to URL scope issue - incorrect data

I just ran into an issue with the URL scope when the following query string was passed:


It ends up with the URL scope looking like this:


Thoughts? Bug?

OS: Windows 10
Java Version: 11.0.11 (AdoptOpenJDK) 64bit
Tomcat Version: 9.0.46
Lucee Version:

Needs more context IMO before throwing up the :beetle: flag. Some code may help.

1 Like

At a glance, it looks like you html encoded data into a string (& became &) and then used that string as the URL If URL was the intention, URL encoding should be used.

Based on the string you posted, there’s no Lucee bug.

1 Like

Ahhh… I didn’t notice that (it was late!!). I was taking an existing URL param and using cflocation to relocate to a different endpoint. In doing so, I simply appended the original URL param into the new endpoint without calling urlEncodedFormat() because I assumed that the original URL param wasn’t modified.

newUrl = "https://mysite.com/?import=#url.import#"
cflocation(url=urlRelocate, addToken=false);

should have been:

newUrl = "https://site.com/import/?import=#urlEncodedFormat(url.import)#"
cflocation(url=urlRelocate, addToken=false);