Skip to content

Conversation

@xrgzs
Copy link
Contributor

@xrgzs xrgzs commented Feb 3, 2025

Fix: #7772 (comment)

.url 格式没有默认添加到代理类型中,/p/ 会返回 403

GET http://127.0.0.1:5244/p/onedrive/jump.url?alist_ts=1738570002208

{"code":403,"message":"proxy not allowed","data":null}

前端:AlistGo/alist-web#248

@hshpy
Copy link
Contributor

hshpy commented Feb 3, 2025

原来是这个原因。
可以前端url加个白名单吗,代码处window.open()有xss注入风险。
新建alist文档.url,文件内容如下
javascript:alert('alist document');window.location='https://alist.nn.ci/zh';

@xrgzs
Copy link
Contributor Author

xrgzs commented Feb 3, 2025

原来是这个原因。 可以前端url加个白名单吗,代码处window.open()有xss注入风险。 新建alist文档.url,文件内容如下 javascript:alert('alist document');window.location='https://alist.nn.ci/zh';

AlistGo/alist-web@af0b52c

修改后这个XSS Payload会跳转到about:blank

@xhofe xhofe merged commit 3f9bed3 into AlistGo:main Feb 9, 2025
12 checks passed
long2005a1 added a commit to long2005a1/Long-Cloud that referenced this pull request Feb 14, 2025
@xrgzs xrgzs deleted the fix/url-proxy-type branch March 27, 2025 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Internet Shortcut .url 文件跳转到网页没有获得正确的URL

3 participants