From dca9454c1d94e075e37a5ad9b6ee9b7e7d0d5745 Mon Sep 17 00:00:00 2001 From: michaeloffner Date: Mon, 25 Sep 2023 20:57:13 +0200 Subject: [PATCH] logout when switching multi mode --- core/src/main/cfml/context/admin/index.cfm | 2 +- core/src/main/cfml/context/admin/logout.cfm | 21 ++++++++++++++++----- core/src/main/cfml/context/admin/web.cfm | 7 ++++++- loader/build.xml | 2 +- loader/pom.xml | 2 +- 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/core/src/main/cfml/context/admin/index.cfm b/core/src/main/cfml/context/admin/index.cfm index 6696e744e4..09ea0a034c 100644 --- a/core/src/main/cfml/context/admin/index.cfm +++ b/core/src/main/cfml/context/admin/index.cfm @@ -3,6 +3,6 @@ include "web.cfm"; } else { - location url="web.cfm?reinit=true" addtoken="no"; + location url="server.cfm?reinit=true" addtoken="no"; } \ No newline at end of file diff --git a/core/src/main/cfml/context/admin/logout.cfm b/core/src/main/cfml/context/admin/logout.cfm index 1de1168b7d..218094241c 100755 --- a/core/src/main/cfml/context/admin/logout.cfm +++ b/core/src/main/cfml/context/admin/logout.cfm @@ -1,5 +1,16 @@ - - - - - \ No newline at end of file + + StructDelete(application, "stText"); + StructDelete(application, "UpdateProvider"); + if(structKeyExists(url, "full")) { + systemOutput("=>"&request.adminType,1,1); + StructDelete(session,"passwordweb"); + StructDelete(session,"passwordserver"); + cookie expires="Now" name="lucee_admin_pw_web" value=""; + cookie expires="Now" name="lucee_admin_pw_server" value=""; + } + else { + StructDelete(session,"password"&request.adminType); + cookie expires="Now" name="lucee_admin_pw_#request.adminType#" value=""; + } + location url="#cgi.SCRIPT_NAME#" addtoken="No"; + \ No newline at end of file diff --git a/core/src/main/cfml/context/admin/web.cfm b/core/src/main/cfml/context/admin/web.cfm index c27552bf18..50ffbbf6c1 100755 --- a/core/src/main/cfml/context/admin/web.cfm +++ b/core/src/main/cfml/context/admin/web.cfm @@ -1,4 +1,5 @@ + request.singleMode=getApplicationSettings().singleContext; if(request.singleMode && right(cgi.script_name,9)!="index.cfm") { @@ -47,7 +48,11 @@ - + + if(structKeyExists(url, "reinit") && (url.action?:"") != "logout") { + location url="#cgi.SCRIPT_NAME#?action=logout&full=true" addtoken="No"; + } + diff --git a/loader/build.xml b/loader/build.xml index b68c693d8f..43fe9af6a2 100644 --- a/loader/build.xml +++ b/loader/build.xml @@ -2,7 +2,7 @@ - + diff --git a/loader/pom.xml b/loader/pom.xml index 79999bdea4..6b4d7efca2 100644 --- a/loader/pom.xml +++ b/loader/pom.xml @@ -3,7 +3,7 @@ org.lucee lucee - 6.0.0.561-SNAPSHOT + 6.0.0.562-SNAPSHOT jar Lucee Loader Build