Audit fixes: LIVE symbols/fills/expiry/pending, security harden, add 更新说明.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -22,14 +22,12 @@ def upsert_env_keys(updates: dict[str, str]) -> Path | None:
|
||||
return target
|
||||
|
||||
|
||||
def mask_secret(raw: str | None, *, keep: int = 4) -> str | None:
|
||||
"""脱敏:****末尾;过短则全部打码。"""
|
||||
def mask_secret(raw: str | None, *, keep: int = 0) -> str | None:
|
||||
"""脱敏:仅返回是否已配置(不再泄露末尾字符)。"""
|
||||
s = (raw or "").strip()
|
||||
if not s:
|
||||
return None
|
||||
if len(s) <= keep:
|
||||
return "*" * len(s)
|
||||
return "*" * max(4, len(s) - keep) + s[-keep:]
|
||||
return "********"
|
||||
|
||||
|
||||
def okx_keys_configured(s=None) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user