leftbower
09/14/2022, 11:47 PMvar userSessions = createObject( "java", "coldfusion.runtime.SessionTracker" ).getSessionCollection( application.applicationName );
userSessions.each( ( user ) => structClear( userSessions[ user ] ) );
Scott Steinbeck
09/15/2022, 1:26 AMScott Steinbeck
09/15/2022, 1:27 AMwebsolete
09/15/2022, 1:36 AMzackster
09/15/2022, 7:38 AMRodney
09/15/2022, 11:55 AMleftbower
09/15/2022, 7:30 PM"coldfusion.runtime.SessionTracker"
a bad or unsafe practice?websolete
09/15/2022, 7:35 PMapplication.sessionControl = gettickcount();
that gets set during app init, then is propagated to the session onSessionStart(). in onRequestStart() you check if session.sessionControl == application.sessionControl you do nothing, if it's different you invalidate their session (and presumably redirect to login). all you'd need is some backend/admin way of updating application.sessionControl when you need to force users to reloginwebsolete
09/15/2022, 7:36 PMRodney
09/15/2022, 7:38 PMRodney
09/15/2022, 7:40 PMScott Steinbeck
09/15/2022, 7:40 PMScott Steinbeck
09/15/2022, 7:40 PMScott Steinbeck
09/15/2022, 7:44 PMfunction onRequestStart(){
application.sessionStartDate = '2022-10-15';
if(!structKeyExists(session,'sessionStartDate') || session.sessionStartDate != application.sessionStartDate){
//invalidate token here
}
}
something like thatwebsolete
09/15/2022, 7:46 PMSo is the use of theit certainly was in the past, not sure what the prevailing sentiment is about it nowadays. back when it was thrown around it would grind miserably if you had anything more than 'a few' sessions, whatever that number was. it was just a costly/uncodumented way of 'managing' sessionsa bad or unsafe practice?"coldfusion.runtime.SessionTracker"
leftbower
09/15/2022, 7:47 PMcoldfusion.runtime.SessionTracker
the wheels started turning because then I could also do things like manipulate data in an individual user's session scope remotely (e.g. add a new role/permission on next request, etc.)