fix: Initial pairing doesn't have csrf token yet

This commit is contained in:
overflowerror 2024-08-05 22:42:44 +02:00
parent 86c4d771c7
commit 9f7dc62791

View file

@ -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"]];
}