Skip to content

Commit 4455bfe

Browse files
authored
Only make the change to _lastInvalidEvent if Coldbox 5 detected
Checks the version of Coldbox and only applies the fix for Coldbox 5.
1 parent 6bd9907 commit 4455bfe

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

interceptors/Security.cfc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/**
22
* Copyright since 2016 by Ortus Solutions, Corp
33
* www.ortussolutions.com
44
* ---
@@ -227,9 +227,12 @@ component accessors="true" extends="coldbox.system.Interceptor" {
227227
required currentEvent
228228
){
229229
// Get handler bean for the current event
230-
var handlerBean = variables.handlerService.getHandlerBean( arguments.event.getCurrentEvent() );
230+
var handlerBean = variables.handlerService.getHandlerBean( arguments.event.getCurrentEvent() );
231231

232-
if ( isInvalidEventHandlerBean( handlerBean ) ) {
232+
if (
233+
listGetAt( controller.getColdboxSettings().version, 1, "." ) == 5 &&
234+
isInvalidEventHandlerBean( handlerBean )
235+
) {
233236
// ColdBox tries to detect invalid event handler loops by keeping
234237
// track of the last invalid event to fire. If that invalid event
235238
// fires twice, it throws a hard exception to prevent infinite loops.

0 commit comments

Comments
 (0)