From 413f2c24ba781e6052438824cc73ad18d34c45aa Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Fri, 16 Aug 2024 17:06:33 -0700 Subject: [PATCH] login: fix secure subdomain login (some vars not passed) --- kinode/src/http/login.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/kinode/src/http/login.html b/kinode/src/http/login.html index 0e5481b54..6d197345f 100644 --- a/kinode/src/http/login.html +++ b/kinode/src/http/login.html @@ -177,9 +177,10 @@

Logging in...

document.getElementById("login-button").disabled = false; isInitialized = true; + return [isSecureSubdomain, firstPathItem]; } - async function login(password) { + async function login(password, isSecureSubdomain, firstPathItem) { document.getElementById("login-form").style.display = "none"; document.getElementById("loading").style.display = "flex"; @@ -219,18 +220,18 @@

Logging in...

} document.addEventListener("DOMContentLoaded", () => { - initializeLoginForm(); + const [isSecureSubdomain, firstPathItem] = initializeLoginForm(); const form = document.getElementById("login-form"); form.addEventListener("submit", (e) => { e.preventDefault(); e.stopPropagation(); if (isInitialized) { const password = document.getElementById("password").value; - login(password); + login(password, isSecureSubdomain, firstPathItem); } }); }); - \ No newline at end of file +