This commit is contained in:
owenchen committed 2026-10-18 08:55:43 +08:00
1 parent 53184877cd
commit 479762b57e
5 files changed
+457 -1

No files matched your search

+11
View File
@@ -99,6 +99,17 @@ def _parse_tokens() -> dict:
_TOKEN_MAP = _parse_tokens()
# 弱口令提醒:示例占位符(REPLACE_ME_*)或过短的 token 不该出现在正式环境。
# 只告警不阻止启动,避免影响联调;换成真随机串后这条日志自动消失。
_weak_clients = sorted(
{name for tok, name in _TOKEN_MAP.items() if "REPLACE_ME" in tok.upper() or len(tok) < 12}
)
if _weak_clients:
log.warning(
"token 过弱或仍是示例占位符,请尽快更换:%s(生成:openssl rand -hex 24)",
", ".join(_weak_clients),
)
_engine = None