File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ enable_verbose_error_log = true ; internal use only
1818enable_redirect_message = true ; internal use only
1919enable_exception_handler = true ; internal use only
2020enable_error_handler = true ; internal use only
21+ session_cleanup_age_seconds = 1800 ; how old a session must be before messages and CSRF tokens are cleared
2122
2223[ldap]
2324uri = "ldap://identity" ; URI of remote LDAP server
Original file line number Diff line number Diff line change 4242 $ _SESSION ["csrf_tokens " ] = [];
4343}
4444
45+ // https://stackoverflow.com/a/1270960/18696276
46+ if (time () - ($ _SESSION ["LAST_ACTIVITY " ] ?? 0 ) > CONFIG ["site " ]["session_cleanup_age_seconds " ]) {
47+ $ _SESSION ["csrf_tokens " ] = [];
48+ $ _SESSION ["messages " ] = [];
49+ }
50+ $ _SESSION ["LAST_ACTIVITY " ] = time ();
51+
4552if (isset ($ _SERVER ["REMOTE_USER " ])) {
4653 // Check if SSO is enabled on this page
4754 $ SSO = UnitySSO::getSSO ();
You can’t perform that action at this time.
0 commit comments