diff --git a/admin.php b/admin.php index 3f3c77d..675df48 100644 --- a/admin.php +++ b/admin.php @@ -462,6 +462,46 @@ $sessionIdleTimeout = get_session_idle_timeout(); $calendarBlockReasons = get_calendar_block_reasons(); $brainstormCategories = get_brainstorm_categories(); +// PHP Runtime, Database & Security Patch Status +$phpVersion = PHP_VERSION; +$phpSapi = php_sapi_name(); +$phpMemoryLimit = ini_get('memory_limit') ?: 'Onbekend'; +$phpMaxExecution = ini_get('max_execution_time') ? ini_get('max_execution_time') . 's' : 'Onbeperkt'; +$phpOpcacheEnabled = function_exists('opcache_get_status') && !empty(opcache_get_status(false)['opcache_enabled']); +$phpOpensslVersion = defined('OPENSSL_VERSION_TEXT') ? OPENSSL_VERSION_TEXT : 'Niet gedetecteerd'; + +// PHP Security Patch status (CVE-2026-109618 / CVE-2026-109619 PHP2Shell) +// Gepatched in 8.2.35, 8.3.36, 8.4.27, 8.5.12 +$isPhpPatched = false; +$patchRequiredVersion = ''; +$isSupportedPhpBranch = true; + +if (version_compare($phpVersion, '8.2.0', '>=') && version_compare($phpVersion, '8.3.0', '<')) { + $patchRequiredVersion = '8.2.35'; + $isPhpPatched = version_compare($phpVersion, '8.2.35', '>='); +} elseif (version_compare($phpVersion, '8.3.0', '>=') && version_compare($phpVersion, '8.4.0', '<')) { + $patchRequiredVersion = '8.3.36'; + $isPhpPatched = version_compare($phpVersion, '8.3.36', '>='); +} elseif (version_compare($phpVersion, '8.4.0', '>=') && version_compare($phpVersion, '8.5.0', '<')) { + $patchRequiredVersion = '8.4.27'; + $isPhpPatched = version_compare($phpVersion, '8.4.27', '>='); +} elseif (version_compare($phpVersion, '8.5.0', '>=')) { + $patchRequiredVersion = '8.5.12'; + $isPhpPatched = version_compare($phpVersion, '8.5.12', '>='); +} else { + // PHP < 8.2 (End of Life) + $patchRequiredVersion = '8.2.35+'; + $isPhpPatched = false; + $isSupportedPhpBranch = false; +} + +$dbVersion = 'Onbekend'; +try { + $dbVersion = (string)$db->query("SELECT VERSION()")->fetchColumn() ?: 'Onbekend'; +} catch (Throwable $e) { + $dbVersion = 'Niet beschikbaar'; +} + // Redirect URI $redirectUri = rtrim(APP_URL, '/') . '/auth/callback_microsoft.php'; @@ -1973,6 +2013,94 @@ require_once __DIR__ . '/includes/header.php';