const KNOWN_WEAK_GATEWAY_PASSWORDS: ReadonlySet<string> = new Set(
KNOWN_WEAK_GATEWAY_PASSWORD_PLACEHOLDERS,
);
export function assertGatewayAuthNotKnownWeak(auth: ResolvedGatewayAuth): void { if (auth.mode === "token") { const token = auth.token?.trim() ?? ""; if (token && KNOWN_WEAK_GATEWAY_TOKENS.has(token)) { thrownew Error( "Invalid config: gateway auth token is set to a published example placeholder " + "from docs or .env.example. Generate a real secret (e.g. `openssl rand -hex 32`) " + "and set OPENCLAW_GATEWAY_TOKEN or gateway.auth.token before starting " + "the gateway.",
);
} return;
} if (auth.mode === "password") { const password = auth.password?.trim() ?? ""; if (password && KNOWN_WEAK_GATEWAY_PASSWORDS.has(password)) { thrownew Error( "Invalid config: gateway auth password is set to the example placeholder " + "from .env.example. Choose a real password and set OPENCLAW_GATEWAY_PASSWORD " + "or gateway.auth.password before starting the gateway.",
);
}
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-09-27)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.