alist-org / alist

🗂️A file list/WebDAV program that supports multiple storages, powered by Gin and Solidjs. / 一个支持多存储的文件列表/WebDAV程序,使用 Gin 和 Solidjs。
https://alist.nn.ci
GNU Affero General Public License v3.0
42.52k stars 5.5k forks source link

天翼云盘客户端 刷新token有问题 #6992

Closed OctLan closed 1 month ago

OctLan commented 1 month ago

Please make sure of the following things

AList Version / AList 版本

v3.36.0

Driver used / 使用的存储驱动

天翼云盘客户端

Describe the bug / 问题描述

用s3接口使用天翼云盘 后一段时间重新使用接口报错 serve s3: code: InvalidSessionKey ,msg: sessionKey=bf6efc95-7a9c-4f5a-8d2b-1963d7415e45_family,invalid sessionKey, requestId=a31b0a1d-5ca6-4404-8a21-cc7b05fd7a1c

查看了下代码 天翼云盘驱动 alist/drivers/189pc/utils.go
func (y *Cloud189PC) refreshSession() (err error) 这里 y.tokenInfo.UserSessionResp = userSessionResp 感觉应该是 y.tokenInfo = userSessionResp 另外 refreshSession 后 需要重新 发送请求 y.request(url, method, callback, params, resp) 是否少了参数 isFamily

Reproduction / 复现链接

Config / 配置

默认配置

Logs / 日志

No response

welcome[bot] commented 1 month ago

Thanks for opening your first issue here! Be sure to follow the issue template!

foxxorcat commented 1 month ago

这里 y.tokenInfo.UserSessionResp = userSessionResp 感觉应该是 y.tokenInfo = userSessionResp 这个没问题,struct是嵌套关系 这个问题是错误判断漏掉了对 code 代码的判断,(由于api是不同时间段获取的,导致错误返回多种多样,漏了这部分。