From c6a629cf7bf03738ce86813f828bf245d9715101 Mon Sep 17 00:00:00 2001 From: Nurfog Date: Wed, 9 Sep 2026 15:37:55 -0300 Subject: [PATCH] fix: allowlist acepta correos sin hash (valida backend) --- src/lib/auth.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/auth.ts b/src/lib/auth.ts index 3b1f474..23ce176 100644 --- a/src/lib/auth.ts +++ b/src/lib/auth.ts @@ -34,7 +34,12 @@ export function parseUsers(): Map { const raw = process.env.IT_USERS || ""; for (const part of raw.split(",")) { const i = part.indexOf(":"); - if (i > 0) m.set(part.slice(0, i).trim().toLowerCase(), part.slice(i + 1).trim()); + if (i > 0) { + m.set(part.slice(0, i).trim().toLowerCase(), part.slice(i + 1).trim()); + } else if (part.trim()) { + // Sin hash: la clave la valida el backend (sige_sam_v3.usuario) + m.set(part.trim().toLowerCase(), ""); + } } return m; }