feat(uss): add AntiTheftChainToken; fix link func #5115
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
故障: 参考之前的issue #4948
当开启了又拍云的时间戳防盗链之后,由于获取的连接的
_upt
参数错误,导致无法正常查看、下载文件。经过查阅又拍云文档,目前的又拍云驱动获取链接的代码中,
_upt
参数的获取有问题,根据下图,获取的时候第一个参数应当是防盗链token,而不是操作员密码因此,添加了新的防盗链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就仍然可以正常查看和下载文件了。