1014 B
1014 B
2026-06-06 — 安装向导步骤 3 账号密码预检
摘要
步骤 3 新增「检测 MySQL / Redis 连接」按钮;init-db 在写 .env 前强制校验账号密码,避免 TCP 通但 Redis/MySQL 认证失败仍进入步骤 4。
动机
用户反馈步骤 3 仅 TCP 检测,Redis 密码错误仍初始化成功,步骤 4 才失败且无法重回步骤 3。
涉及文件
server/api/install.py—POST /api/install/test-credentials、_credential_checks、init-db前置校验web/app/install.html— 步骤 3 检测 UI,未通过禁用「初始化数据库」tests/test_security_unit.py— 新端点单测
验证
.venv/bin/pytest tests/test_security_unit.py -k install_test_credentials -q
bash deploy/sync-install-wizard-to-container.sh
向导步骤 3:错误 Redis 密码 → 检测失败;修正后检测通过 → 可初始化。
迁移 / 重启
无 DB 迁移。部署后 sync-install-wizard-to-container.sh 或 nx update --no-cache。