fix(security): prevent gateway token from defaulting to 'undefined' string

This commit is contained in:
Hisleren
2026-01-30 23:06:07 +03:00
committed by Gustavo Madeira Santana
parent 0175cedf0e
commit 201d7fa956
2 changed files with 5 additions and 2 deletions

View File

@@ -177,7 +177,8 @@ export async function promptGatewayConfig(
}),
runtime,
);
gatewayToken = String(tokenInput).trim() || randomToken();
const rawInput = tokenInput ? String(tokenInput).trim() : "";
gatewayToken = rawInput || randomToken();
}
if (authMode === "password") {