feat: 添加安全模块 + Dockerfile添加curl支持健康检查
主要更新: - 新增 security/ 安全模块 (风险评估、威胁检测、蜜罐等) - Dockerfile 添加 curl 以支持 Docker 健康检查 - 前端页面更新 (管理后台、用户端) - 数据库迁移和 schema 更新 - 新增 kdocs 上传服务 - 添加安全相关测试用例 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -573,8 +573,16 @@ def run_task(user_id, account_id, browse_type, enable_screenshot=True, source="m
|
||||
|
||||
with APIBrowser(log_callback=custom_log, proxy_config=proxy_config) as api_browser:
|
||||
if api_browser.login(account.username, account.password):
|
||||
log_to_client("✓ 登录成功!", user_id, account_id)
|
||||
api_browser.save_cookies_for_playwright(account.username)
|
||||
log_to_client("✓ 首次登录成功,刷新登录时间...", user_id, account_id)
|
||||
|
||||
# 二次登录:让"上次登录时间"变成刚才首次登录的时间
|
||||
# 这样截图时显示的"上次登录时间"就是几秒前而不是昨天
|
||||
if api_browser.login(account.username, account.password):
|
||||
log_to_client("✓ 二次登录成功!", user_id, account_id)
|
||||
else:
|
||||
log_to_client("⚠ 二次登录失败,继续使用首次登录状态", user_id, account_id)
|
||||
|
||||
api_browser.save_cookies_for_screenshot(account.username)
|
||||
database.reset_account_login_status(account_id)
|
||||
|
||||
if not account.remark:
|
||||
|
||||
Reference in New Issue
Block a user