From e310d5e8ee249d7424876de8758b425c7161af62 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Mon, 5 Jan 2026 15:27:35 +0000 Subject: [PATCH] FS: Only attempt session rotation if expiration cookie exists (#115824) don't attempt rotation if no expiration cookie exists --- pkg/services/frontend/index.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/services/frontend/index.html b/pkg/services/frontend/index.html index 198b8216189..777513358c1 100644 --- a/pkg/services/frontend/index.html +++ b/pkg/services/frontend/index.html @@ -250,11 +250,14 @@ } } - return null; + return undefined; } function getSessionExpiration() { - const value = getCookie("grafana_session_expiry") || "0"; + const value = getCookie("grafana_session_expiry"); + if (!value) { + return undefined; + } const realExpiresSeconds = parseInt(value, 10); const expiresSeconds = Math.max(realExpiresSeconds - 10, 0); // Rotate 10s before the real expiration const expiration = new Date(expiresSeconds * 1000); @@ -332,7 +335,7 @@ const now = new Date(); // If the session has expired, don't continue trying to fetch boot data - if (now >= sessionExpiration) { + if (sessionExpiration && now >= sessionExpiration) { await rotateSession(); } } catch (error) {