CFLocation broken when target URL contains extended characters

Description

<cfset someTarget={some URL containing one or more extended characters}>
<cflocation url="#someTarget#">

>> Extended chars here become question marks... and the result is 404

Using CFHeader instead... resolves the problem:

<cfheader charset="utf-8" name="location" value="#someTarget#">
<cfheader statuscode="302">

CFLocation should respect the active character set - or should provide a 'charset' attribute so it can be explicitly specified.

========
ACF (all recent versions) has the same problem, and it appears that they refuse to fix it... but Lucee can do better

This problem is well documented in a StackOverflow article and an Adobe bug report:
https://stackoverflow.com/questions/25979344/redirect-to-utf-8-url-with-coldfusion
https://tracker.adobe.com/#/view/CF-3830375

Environment

Lucee 5.3.3.62, Linux (CentOS 7 with latest patches), Java 11.0.3
startup script contains the following (so CFDirectory doesn't choke on extended chars in filenames)
export LC_ALL="en_US.UTF-8"
export LANG="en_US.UTF-8"

Activity

Show:

Michael Offner 1 November 2019 at 13:05

what exactly are “Extended chars“? non ascii?

Pothys - MitrahSoft 10 October 2019 at 09:53
Edited

I've checked this ticket & confirmed the issue happened on lucee both affected version and the latest version of 5.3.5.16-SNAPSHOT also. will confirm about this.

Details

Assignee

Reporter

Priority

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

Affects versions

Created 11 September 2019 at 17:01
Updated 1 July 2023 at 15:37

Flag notifications