Skip to content

Commit

Permalink
logout when switching multi mode
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Sep 25, 2023
1 parent c3f7df1 commit dca9454
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion core/src/main/cfml/context/admin/index.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
include "web.cfm";
}
else {
location url="web.cfm?reinit=true" addtoken="no";
location url="server.cfm?reinit=true" addtoken="no";
}
</cfscript>
21 changes: 16 additions & 5 deletions core/src/main/cfml/context/admin/logout.cfm
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<cfset StructDelete(application, "stText")>
<cfset StructDelete(application, "UpdateProvider")>
<cfset StructDelete(session,"password"&request.adminType)>
<cfcookie expires="Now" name="lucee_admin_pw_#request.adminType#" value="">
<cflocation url="#cgi.SCRIPT_NAME#" addtoken="No">
<cfscript>
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";
</cfscript>
7 changes: 6 additions & 1 deletion core/src/main/cfml/context/admin/web.cfm
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<cfscript>
request.singleMode=getApplicationSettings().singleContext;
if(request.singleMode && right(cgi.script_name,9)!="index.cfm") {
Expand Down Expand Up @@ -47,7 +48,11 @@
<cfparam name="form.rememberMe" default="s">
<cfset ad = request.adminType>
<cfset request.self = (request.singleMode?"index": request.adminType )& ".cfm">

<cfscript>
if(structKeyExists(url, "reinit") && (url.action?:"") != "logout") {
location url="#cgi.SCRIPT_NAME#?action=logout&full=true" addtoken="No";
}
</cfscript>
<cfparam name="cookie.lucee_admin_lang" default="en">
<cfset session.lucee_admin_lang = cookie.lucee_admin_lang>

Expand Down
2 changes: 1 addition & 1 deletion loader/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project default="core" basedir="." name="Lucee"
xmlns:resolver="antlib:org.apache.maven.resolver.ant">

<property name="version" value="6.0.0.561-SNAPSHOT"/>
<property name="version" value="6.0.0.562-SNAPSHOT"/>

<taskdef uri="antlib:org.apache.maven.resolver.ant" resource="org/apache/maven/resolver/ant/antlib.xml">
<classpath>
Expand Down
2 changes: 1 addition & 1 deletion loader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.lucee</groupId>
<artifactId>lucee</artifactId>
<version>6.0.0.561-SNAPSHOT</version>
<version>6.0.0.562-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Lucee Loader Build</name>
Expand Down

0 comments on commit dca9454

Please sign in to comment.