Update management-auth.ts
CI / ci (push) Canceled after 0s

This commit is contained in:
Stefan Lazic committed 2026-09-04 22:42:28 +01:00
1 parent 1c281c9f5d
commit 0dd50c0375
1 file changed
+2 -1
+2 -1
View File
@@ -40,7 +40,8 @@ export async function clearManagerSession() {
export async function isManagerAuthenticated() { export async function isManagerAuthenticated() {
const config = getManagerConfig(); const config = getManagerConfig();
if (!config.authSecret) return false; if (!config.authSecret) return false;
const value = (await cookies()).get(COOKIE_NAME)?.value; const rawValue = (await cookies()).get(COOKIE_NAME)?.value;
const value = rawValue ? decodeURIComponent(rawValue) : undefined;
if (!value) return false; if (!value) return false;
const separator = value.lastIndexOf("."); const separator = value.lastIndexOf(".");
if (separator < 1) return false; if (separator < 1) return false;