We're updating the issue view to help you get more done. 

Access to variables scope in onSessionStart() is not thread safe

Description

If I use the following Application.cfc (with an empty index.cfm file):

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 component { this.name = 'testApp'; this.sessionManagement = true; variables.templateId = createUuid(); function onSessionStart() { request.templateId = variables.templateId; } function onRequestStart( string targetPage ) { writeOutput( "variables.templateId: " & variables.templateId ); writeOutput( chr(10) ); writeOutput( "request.templateId: " & request.templateId ); } }

and hit it with a number of simultaneous new session requests, there will always be at least one request where variables.templateId does not match request.templateId. Instead the outputted request.templateId will match the variables.templateId of one of the other requests.

Environment

None

Status

Assignee

Michael Offner

Reporter

John Berquist

Labels

None

Sprint

None

Fix versions

Affects versions

4.5.2.017

Priority

Critical