mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 17:30:23 +08:00
fix: 增强代理密码脱敏策略并补充异常日志
- 密码脱敏阈值从 4 提升至 8,短密码全部遮蔽 - 为系统代理获取、proxy_node 解析、代理 URL 构建添加 warning 日志
This commit is contained in:
@@ -27,10 +27,10 @@ pipeline = ApiRequestPipeline()
|
||||
|
||||
|
||||
def _mask_password(password: str | None) -> str | None:
|
||||
"""脱敏密码,仅显示前2位和后2位"""
|
||||
"""脱敏密码,仅显示前2位和后2位(长度不足 8 时全部遮蔽)"""
|
||||
if not password:
|
||||
return None
|
||||
if len(password) <= 4:
|
||||
if len(password) < 8:
|
||||
return "****"
|
||||
return password[:2] + "****" + password[-2:]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user