Browse code

As of CVE-2026-115560, you can no longer set ini session settings when session.upload_progress.enabled is set to 'On', which is... a LOT of PHP configurations - this now brings up an Uncaught Error in patched versions - you would have to explicitly set these in the php.ini config, or change the aforementioned setting to 'Off' - just-released PHP 8.6.0 does set the session cookie settings in these files to what is specified by default

Clarissa Walker authored on 2026/11/19 13:45:07
Showing 3 changed files
... ...
@@ -50,10 +50,15 @@ foreach ($_GET as $v) {
50 50
 }
51 51
 unset($v);
52 52
 
53
+// as of CVE-2026-115560, you can no longer set these settings if
54
+// session.upload_progress.enabled is set to 'On'
53 55
 if(!isset($_SESSION)) {
54
-	ini_set('session.cookie_httponly', '1');
55
-	ini_set('session.cookie_samesite', 'Lax');
56
-	session_start();
56
+	if (ini_get('session.upload_progress.enabled' == 0)) {
57
+		ini_set('session.cookie_httponly', '1');
58
+		ini_set('session.cookie_samesite', 'Lax');
59
+		session_start();
60
+	}
61
+	else session_start();
57 62
 }
58 63
 // clear the global variables if register globals is on.
59 64
 if(ini_get('register_globals')) {
... ...
@@ -28,9 +28,14 @@ else $current = "login";
28 28
 	}
29 29
 	
30 30
 	if(!empty($_POST['submit']) && $current == "login") {
31
-	ini_set('session.cookie_httponly', '1');
32
-	ini_set('session.cookie_samesite', 'Lax');
33
-	session_start();
31
+	// as of CVE-2026-115560, you can no longer set these settings if
32
+	// session.upload_progress.enabled is set to 'On'
33
+	if (ini_get('session.upload_progress.enabled' == 0)) {
34
+		ini_set('session.cookie_httponly', '1');
35
+		ini_set('session.cookie_samesite', 'Lax');
36
+		session_start();
37
+	}
38
+	else session_start();
34 39
 	define("_LOGINCHECK", true);		
35 40
 		include("user/login.php");
36 41
 	}
... ...
@@ -69,11 +69,15 @@
69 69
 				setcookie($sitekey."_useruid", $passwd['uid'], array('expires' => time()+60*60*24*30, 'path' => "/", 'httponly' => true, 'samesite' => 'Lax'));
70 70
 				setcookie($sitekey."_salt", md5($passwd['email'].$encryptedpassword), array('expires' => time()+60*60*24*30, 'path' => "/", 'httponly' => true, 'samesite' => 'Lax'));
71 71
 			}
72
+			// as of CVE-2026-115560, you can no longer set these settings if
73
+			// session.upload_progress.enabled is set to 'On'
72 74
 			if(!isset($_SESSION)) {
73
-				// Maintenance fork: match header.php's httponly/Lax session cookie.
74
-				ini_set('session.cookie_httponly', '1');
75
-				ini_set('session.cookie_samesite', 'Lax');
76
-				session_start( );
75
+				if (ini_get('session.upload_progress.enabled' == 0)) {
76
+					ini_set('session.cookie_httponly', '1');
77
+					ini_set('session.cookie_samesite', 'Lax');
78
+					session_start();
79
+				}
80
+				else session_start();
77 81
 			}
78 82
 			session_regenerate_id(true);
79 83
 			$_SESSION[$sitekey."_useruid"] = $passwd['uid'];