Links in README lead to 403
- 主要语言
- Python
- 星标
- 46.7k
- 派生
- 1.9k
- 平均合并
- 9 天 2 小时
- 30 天内合并 PR
- 4
描述
### Describe the bug
I set up a README.md in my root of my copyparty server, it has a link to a file (tried with full URL and "relative" URL) on the copyparty server, but when I click on it, it logs me out and gives a 403 error. Copying the same URL and pasting it in a new tab opens it successfully (some iframe policy maybe?).
### To Reproduce
1. Set up a server that is only viewable with an account.
2. Create a random text file that will be linked later
3. Create a README.md file
4. In the README link to the other file either with the full URL of the file or a short url: `[file.txt](/file.txt)`
5. Go to the directory listing
6. Click the link in the README preview at the bottom
### Expected behavior
The file would open/download.
### Screenshots
### Server details (if you're NOT using docker/podman)
remove the ones that are not relevant:
* **server OS / version:**
* **what copyparty did you grab:** sfx
* **how you're running it:** systemd-service
* run copyparty with `--version` and grab the last 3 lines (they start with `copyparty`, `CPython`, `sqlite`) and paste them below this line:
```
copyparty v1.18.5 "logtail" (2025-07-27)
CPython v3.10.12 on Linux64 22.04.1 [GCC 11.4.0]
sqlite 3.37.2*1 | jinja 3.1.2 | pyftpd 1.5.10 | tftp 0.4.0
```
* Config:
```
[global]
e2dsa, e2ts, ansi
ftp: 21
name: hs.playlook.de
no-crt, https-only
hist: /home/lukas/.cache/copyparty
```
### Client details
if the issue is possibly on the client-side, then mention some of the following:
* the device type and model: Android and Desktop
* browser version: Firefox 141.0 and Chromium 138.0.7204.168
### Additional context
I have HTTPS set up but on port 3923.
贡献指南
调研方向
这个 issue 涉及 README.md 中的链接:点击时会导致 403 错误,但粘贴后可以正常工作。查看 README 渲染和链接处理代码,可能位于 web UI 或 markdown 处理器中。检查身份验证 cookies 或 iframe 策略是如何应用的。使用受保护的服务器在本地复现该 bug,并检查网络请求,看看点击和粘贴 URL 之间有什么不同。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- frontend, security
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 描述清楚
- 新手友好度
- 65/100