From ab6d39c2c967376a6c13919f0f2f9fd9295db3c1 Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Wed, 1 Jan 2025 11:09:36 +0100 Subject: [PATCH] LDEV-5230 internalRequest should not create sessions https://luceeserver.atlassian.net/browse/LDEV-5230 --- .../lucee/runtime/functions/system/InternalRequest.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/core/src/main/java/lucee/runtime/functions/system/InternalRequest.java b/core/src/main/java/lucee/runtime/functions/system/InternalRequest.java index 22a4315b66..25a528b065 100644 --- a/core/src/main/java/lucee/runtime/functions/system/InternalRequest.java +++ b/core/src/main/java/lucee/runtime/functions/system/InternalRequest.java @@ -147,7 +147,7 @@ else if (body != null) { _pc.flush(); // cookie = _pc.cookieScope().duplicate(false); request = _pc.requestScope().duplicate(false); - session = sessionEnabled(_pc) ? _pc.sessionScope().duplicate(false) : null; + session = _pc.hasCFSession() ? _pc.sessionScope().duplicate(false) : null; exeTime = System.currentTimeMillis() - pc.getStartTime(); // debugging=_pc.getDebugger().getDebuggingData(_pc).duplicate(false); @@ -244,12 +244,6 @@ private static Struct toStruct(Object obj) throws PageException { return data; } - private static boolean sessionEnabled(PageContextImpl pc) { - ApplicationContext ac = pc.getApplicationContext(); - if (ac == null) return false;// this test properly is not necessary - return ac.hasName() && ac.isSetSessionManagement(); - } - private static void fillForm(PageContextImpl _pc, Struct src, Charset charset) throws PageException { if (src == null) return;