fix: 按评审报告止血支付漏洞并加固授权链路

废除浏览器回跳自助结算,通用 webhook 强制密钥鉴权,Waffo 支持验签与未知事件忽略;重构订单状态机/激活占座/SQLite WAL,并补备份、readyz、限流与前端导出/登录页安全修复。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Logan.LiandCursor committed 2026-08-12 21:26:58 +08:00
1 parent 8cc2c83f9d
commit bac72e6945
24 files changed
+682 -391

No files matched your search

+27 -1
View File
@@ -26,11 +26,37 @@ services:
volumes:
- licence_data:/data
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:9001/health"]
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:9001/readyz"]
interval: 15s
timeout: 3s
retries: 5
start_period: 15s
# SQLite 每日备份 sidecar(保留最近 7 份) // Logan.Li
backup:
image: alpine:3.20
container_name: opsx-licence-backup
restart: unless-stopped
volumes:
- licence_data:/data:ro
- ./backups:/backups
entrypoint: ["/bin/sh", "-c"]
command:
- |
apk add --no-cache sqlite >/dev/null 2>&1 || true
while true; do
ts=$$(date +%Y%m%d-%H%M%S)
if [ -f /data/db.sqlite3 ]; then
if command -v sqlite3 >/dev/null 2>&1; then
sqlite3 /data/db.sqlite3 ".backup '/backups/db-$$ts.sqlite3'"
else
cp /data/db.sqlite3 /backups/db-$$ts.sqlite3
fi
ls -t /backups/db-*.sqlite3 2>/dev/null | tail -n +8 | xargs -r rm -f
echo "[backup] done $$ts"
fi
sleep 86400
done
volumes:
licence_data: