5ea5c3a411
tmp_token 登录在 :port/login,非 :port/{admin}/login,后者 nginx 404。
Co-authored-by: Cursor <cursoragent@cursor.com>
686 B
686 B
2026-06-21 宝塔一键登录 URL 路径修复
摘要
临时登录链接误拼为 https://ip:port/{安全入口}/login?tmp_token=...,宝塔实际入口为 https://ip:port/login?tmp_token=...(带安全入口路径返回 nginx 404)。
动机
生产 curl:/1f78dd53/login?tmp_token=... → 404;/login?tmp_token=... → 302。
涉及文件
server/infrastructure/btpanel/ssh_login.py—_panel_port_base、_login_path_only、_discover_panel_login_base_urltests/test_btpanel_ssh_login.py
验证
.venv/bin/pytest tests/test_btpanel_ssh_login.py -q
POST /api/btpanel/servers/3/login-url # url 应为 ...:port/login?tmp_token=