Skip to content

fix(weiyun): bump weiyun-sdk-go to v0.1.4 to fix nil pointer panic on mount#9561

Open
okatu-loli wants to merge 1 commit into
AlistGo:mainfrom
okatu-loli:fix/weiyun-nil-panic
Open

fix(weiyun): bump weiyun-sdk-go to v0.1.4 to fix nil pointer panic on mount#9561
okatu-loli wants to merge 1 commit into
AlistGo:mainfrom
okatu-loli:fix/weiyun-nil-panic

Conversation

@okatu-loli

Copy link
Copy Markdown
Collaborator

问题 / Problem

挂载腾讯微云(weiyun)存储时,Init 阶段触发 nil pointer panic,导致存储无法初始化。崩溃源自上游 SDK github.com/foxxorcat/weiyun-sdk-go@v0.1.3Resp.HasError(),它在 r.Data 为 nil 时直接解引用 r.Data.RspHeader(types.go:38)。

When mounting Tencent Weiyun storage, a nil pointer panic occurs during Init. The panic originates from the upstream SDK v0.1.3 Resp.HasError() dereferencing r.Data without a nil check.

改动 / Change

  • weiyun-sdk-go 从 v0.1.3 升级到 v0.1.4(上游已修复 nil 解引用:r.Data != nil && ...)。
  • v0.1.4 把 LoginType() 的返回类型从 int8 改成了 string 枚举,相应地把 QQ cookie 保活的判断改为 weiyunsdkgo.AccountTypeQQ

验证 / Verification

go build ./...go vet ./drivers/weiyun/ 通过。

Fixes #9551

… Init

The upstream SDK v0.1.3 had a bug in Resp.HasError() that dereferenced
r.Data without a nil check (types.go:38), causing a nil pointer panic
when mounting Weiyun storage if the API returned a response with an
empty data field. v0.1.4 guards the nil access.

LoginType() also changed from int8 to a string enum in v0.1.4, so the
QQ-cookie keepalive check is updated to compare against AccountTypeQQ.

Fixes AlistGo#9551
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.

[Bug] Mounting Tencent Weiyun storage causes nil pointer panic — blocks all storage operations

2 participants