Files
Nexus/docs/changelog/2026-06-21-btpanel-login-url-path-fix.md
T
r 5ea5c3a411 fix(btpanel): 一键登录 URL 去掉安全入口路径
tmp_token 登录在 :port/login,非 :port/{admin}/login,后者 nginx 404。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-21 10:46:22 +08:00

22 lines
686 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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_url`
- `tests/test_btpanel_ssh_login.py`
## 验证
```bash
.venv/bin/pytest tests/test_btpanel_ssh_login.py -q
POST /api/btpanel/servers/3/login-url # url 应为 ...:port/login?tmp_token=
```