& current'; $PALANG['pPassword_password_text_error'] = 'Invalid & new'; Config::write('__LANG', $PALANG); $path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); if ($path === '/__session') { $globalAdmin = ($_GET['role'] ?? '') === 'global-admin'; $admin = $globalAdmin || ($_GET['role'] ?? '') === 'admin'; init_session($admin ? 'admin@security-list-http.example.com' : 'test@security-list-http.example.com', $admin, true); if ($globalAdmin) { $_SESSION['sessid']['roles'][] = 'global-admin'; } echo 'Session ready'; } else { $pages = [ '/users/password.php' => 'password.php', '/users/totp.php' => 'totp.php', '/list-virtual.php' => 'list-virtual.php', '/edit.php' => 'edit.php', '/app-passwords.php' => 'app-passwords.php', '/users/app-passwords.php' => 'app-passwords.php', '/totp-exceptions.php' => 'totp-exceptions.php', '/users/totp-exceptions.php' => 'totp-exceptions.php', ]; if (!isset($pages[$path])) { http_response_code(404); exit; } // Both public aliases and user routes execute these complete controllers. chdir(dirname(__DIR__, 2) . (in_array($path, ['/list-virtual.php', '/edit.php'], true) ? '/public' : '/public/users')); require $pages[$path]; }