Properly Scope Internal Tag Variables in Lucee Functions

Description

Currently, Lucee tags like cfquery, cflock, and cfthread create unscoped variables in functions that default to the variables scope. This creates exceptions in the cascading write detection system and potential thread safety issues. This ticket aims to properly scope these internal variables to the local scope when used within a function context.

Environment

None

Activity

Michael Offner 
28 April 2025 at 18:06

that you have the variable “result“ indicate that you did test with explicitly set variables like

seems i was not clear with the purpose of the ticket, this ticket is about variables implicitly set by Lucee in case not explicit variable is set, when you do <cfquery name="result"> where this is set depends on the “localMode“ setting, overrule that rule would be a bug in Lucee.

See the test case for more details.

Michael Offner 
28 April 2025 at 17:58

this is about variables implicitly set, not explicitly set.

Pothys - MitrahSoft 
24 April 2025 at 07:42

I have investigated this ticket using Lucee version 7.0.0.204-SNAPSHOT and tested the internal variable scoping of <cfquery> and <cflock>. The variables are still, by default, placed in the variables scope

Zac Spitzer 
16 April 2025 at 08:59

Zac Spitzer 
27 March 2025 at 13:43

i.e what about loop variables, item key, index etc? the 7.0 build is flagging this

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

Created 21 March 2025 at 13:05
Updated 28 April 2025 at 18:06
Resolved 28 April 2025 at 18:06