From 9f7dc62791cf98405d2d68f31b06059551fd6843 Mon Sep 17 00:00:00 2001 From: overflowerror Date: Mon, 5 Aug 2024 22:42:44 +0200 Subject: [PATCH] fix: Initial pairing doesn't have csrf token yet --- html/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/index.php b/html/index.php index ac002ab..f068fd2 100644 --- a/html/index.php +++ b/html/index.php @@ -36,7 +36,7 @@ function reload(): void { } function newPairing(): array { - if ($_REQUEST["csrfToken"] != $_SESSION["csrfToken"]) { + if (isset($_SESSION["csrfToken"]) && ($_REQUEST["csrfToken"] != $_SESSION["csrfToken"])) { return [$_SESSION["left"], $_SESSION["right"]]; }