From d1ed13c04d5e245ec84e544c2f3f9aa93679bcce Mon Sep 17 00:00:00 2001 From: bjorne Date: Thu, 29 Oct 2026 03:02:05 +0100 Subject: [PATCH] =?UTF-8?q?sync=20fr=C3=A5n=20dev=20(svx-web):=20utloggnin?= =?UTF-8?q?gsfixar,=20lastheard=20utan=20trunk-eko,=20svxdr=20p=C3=A5=20eg?= =?UTF-8?q?en=20Redis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - auth/footer.php: libs saknades på auth/*.php-sidorna, så utloggning gick inte (dev 338b139) - auth/lib.php, index.html: cache-bust auth_ui-paret + skydda start_session (dev 052a319) - svxdr/nodelist: lastheard loggar bara riktiga avsändaren, inte utgående trunk-eko (dev e05fa7c) - install/svxdr.json.example: socket = /run/redis-svxportal/redis.sock, samma dedikerade Redis som auth/config.php enligt INSTALL.md (motsvarar dev 5d99683) Co-Authored-By: Claude Opus 5.5 --- auth/footer.php | 4 ++++ auth/lib.php | 7 ++++++- index.html | 4 ++-- install/svxdr.json.example | 2 +- svxdr/nodelist/nodelist.go | 35 +++++++++++++++++++++++++++++++++++ 5 files changed, 48 insertions(+), 4 deletions(-) diff --git a/auth/footer.php b/auth/footer.php index 75f24bd..4da4fab 100644 --- a/auth/footer.php +++ b/auth/footer.php @@ -4,6 +4,10 @@ © 2026 SA7AUX. All rights reserved. + + + diff --git a/auth/lib.php b/auth/lib.php index be827db..d469a2a 100644 --- a/auth/lib.php +++ b/auth/lib.php @@ -71,6 +71,11 @@ function token_hash(string $secret): string { } function start_session(): void { + // Already started → nothing to configure (session_name / + // session_set_cookie_params fatal-warn when the session is active, which + // on display_errors=on leaks output before setcookie()/header() and breaks + // logout's cookie-clear + redirect). Guard the whole config block. + if (session_status() === PHP_SESSION_ACTIVE) return; $s = cfg()['session']; $params = session_get_cookie_params(); session_name($s['name'] ?? 'svxportal_sess'); @@ -82,7 +87,7 @@ function start_session(): void { 'httponly' => true, 'samesite' => $s['cookie_samesite'] ?? 'Lax', ]); - if (session_status() !== PHP_SESSION_ACTIVE) session_start(); + session_start(); } function set_session_user(string $uuid): void { diff --git a/index.html b/index.html index 30c27b3..71eef22 100644 --- a/index.html +++ b/index.html @@ -514,7 +514,7 @@ - + @@ -529,7 +529,7 @@ - +