Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(uss): add AntiTheftChainToken; fix link func #5115

Merged
merged 2 commits into from
Aug 30, 2023

Conversation

Kuingsmile
Copy link
Contributor

故障: 参考之前的issue #4948

当开启了又拍云的时间戳防盗链之后,由于获取的连接的_upt参数错误,导致无法正常查看、下载文件。

经过查阅又拍云文档,目前的又拍云驱动获取链接的代码中,_upt参数的获取有问题,根据下图,获取的时候第一个参数应当是防盗链token,而不是操作员密码

image

因此,添加了新的防盗链token参数,同时将获取_upt的代码从
signStr := strings.Join([]string{d.OperatorPassword, fmt.Sprint(expireAt), fmt.Sprintf("/%s", key)}, "&")
修改为
signStr := strings.Join([]string{d.AntiTheftChainToken, fmt.Sprint(expireAt), fmt.Sprintf("/%s", key)}, "&")

经过测试,现在开启防盗链后,设置了防盗链token就仍然可以正常查看和下载文件了。
image

@welcome
Copy link

welcome bot commented Aug 29, 2023

Thanks for opening this pull request! Please check out our contributing guidelines.

drivers/uss/driver.go Outdated Show resolved Hide resolved
@Kuingsmile Kuingsmile requested a review from xhofe August 29, 2023 09:16
@xhofe xhofe merged commit 092ed06 into alist-org:main Aug 30, 2023
2 checks passed
@welcome
Copy link

welcome bot commented Aug 30, 2023

Congrats on merging your first pull request! We here at behavior bot are proud of you!

@xhofe xhofe added this to the v3.27.0 milestone Sep 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants