We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02d652a commit ab8aed0Copy full SHA for ab8aed0
resources/init.php
@@ -21,8 +21,6 @@
21
set_error_handler(["UnityWebPortal\lib\UnityHTTPD", "errorHandler"]);
22
}
23
24
-session_start();
25
-
26
if (isset($GLOBALS["ldapconn"])) {
27
$LDAP = $GLOBALS["ldapconn"];
28
} else {
@@ -42,10 +40,13 @@
42
40
$_SESSION["csrf_tokens"] = [];
43
41
44
+session_start();
45
// https://stackoverflow.com/a/1270960/18696276
46
if (time() - ($_SESSION["LAST_ACTIVITY"] ?? 0) > CONFIG["site"]["session_cleanup_age_seconds"]) {
47
48
$_SESSION["messages"] = [];
+ session_write_close();
49
+ session_start();
50
51
$_SESSION["LAST_ACTIVITY"] = time();
52
0 commit comments