Skip to content

Merge/openlist post 4.2.5 - #32

Merged
power721 merged 438 commits into
mainfrom
merge/openlist-post-4.2.5
Oct 19, 2026
Merged

power721 merged 438 commits into
mainfrom
merge/openlist-post-4.2.5

Conversation

@power721

Copy link
Copy Markdown
Owner

Summary / 摘要

  • This PR has breaking changes.
    / 此 PR 包含破坏性变更。
  • This PR changes public API, config, storage format, or migration behavior.
    / 此 PR 修改了公开 API、配置、存储格式或迁移行为。
  • This PR requires corresponding changes in related repositories.
    / 此 PR 需要关联仓库同步修改。

Related repository PRs / 关联仓库 PR:

  • OpenList-Frontend:
  • OpenList-Docs:

Related Issues / 关联 Issue

Testing / 测试

  • go test ./...
  • Manual test / 手动测试:

Checklist / 检查清单

  • I have read CONTRIBUTING.
    / 我已阅读 CONTRIBUTING。
  • I confirm this contribution follows the repository license, contribution policy, and code of conduct.
    / 我确认此贡献符合仓库许可证、贡献规范和行为准则。
  • I have formatted the changed code with gofmt, go fmt, or prettier where applicable.
    / 我已按适用情况使用 gofmt、go fmt 或 prettier 格式化变更代码。
  • I have requested review from relevant maintainers or code owners where applicable.
    / 我已在适用情况下请求相关维护者或代码所有者审查。

AI Disclosure / AI 使用声明

  • This PR includes AI-assisted content.
    / 此 PR 包含 AI 辅助内容。

Tools used / 使用工具:

  • ChatGPT
  • Codex
  • GitHub Copilot
  • Claude
  • Gemini
  • Other (please specify) / 其他(请注明):

Usage scope / 使用范围:

  • Code generation / 代码生成

  • Refactoring / 重构

  • Documentation / 文档

  • Tests / 测试

  • Translation / 翻译

  • Review assistance / 审查辅助

  • I have reviewed and validated all AI-assisted content included in this PR.
    / 我已审核并验证此 PR 中的所有 AI 辅助内容。

  • I have ensured that all AI-assisted commits include Co-Authored-By attribution.
    / 我已确保所有 AI 辅助提交都包含 Co-Authored-By 归属信息。

  • I can reproduce all AI-assisted content included in this PR without any AI tools.
    / 我可以在没有任何 AI 工具的情况下重现此 PR 中包含的所有 AI 辅助内容。

jyxjjj and others added 30 commits March 26, 2026 21:01
…(#2269)

Revert "refactor(db)!: replace SQLite Driver with glebarez/sqlite to avoid CG…"

This reverts commit d598ef7.
…itch (#2296)

- Switch default SQLite path to github.com/glebarez/sqlite to reduce CGO dependency pressure.
- Introduce a unified openSQLite entry in bootstrap and split driver selection by build tags.
- Add sqlite_cgo_compat fallback for linux mips, mips64, loong64 and mipsle to keep legacy target builds working.
- Update build.sh musl build flow to apply compatibility tag for mips-family targets.
- Update beta_release workflow to pass compatibility tag cleanly and avoid conflicting flag composition.
* feat(driver): support 123 official app api

* fix(123_open): migrate api refresh to token.go

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>

* fix(drivers/123_open): trigger proactive refresh with client credentials

* fix(drivers/123_open): use client-credential token endpoint for local refresh

Keep renewapi parsing for expires_in and map it to internal expiry time handling.

* fix(drivers/123_open): limit proactive refresh to client credentials

* fix(drivers/123_open): allow renewapi refresh token proactive init

* fix(drivers/123_open): update API address to use renewapi endpoint

* fix(drivers/123_open): simplify token refresh parsing

* fix(drivers/123_open): unify token expiration to expiredAt

---------

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
Co-authored-by: MadDogOwner <xiaoran@xrgzs.top>
Co-authored-by: Suyunmeng <Susus0175@proton.me>
Co-authored-by: Suyunjing <suyunmeng@oplist.org.cn>
* fix(drivers/openlist): pass through frontend refresh flag
* fix(drivers/openlist): gate refresh flag forwarding by config
Fixed the issue of token verification for shared links.
Replace actions/checkout from v4 to v6 across workflows to prepare for the GitHub Actions Node.js 24 migration and avoid Node.js 20 deprecation risk.
…GetLink (#2379)

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
* refactor(settings)!: move FilterReadMeScripts to frontend

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>

* chore: run go mod tidy

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>

---------

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
* fix(drivers): add headers in Link methods

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
* refactor(drivers/wps): remove resolveCache

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>

* fix(drivers/wps): add a small helper that unwraps model.ObjUnwrap

Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>

* fix(drivers/wps): correct misspell

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>

---------

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
Co-authored-by: Copilot <copilot@github.com>
* fix(drivers/wps): implement driver.GetRooter interface

* fix(drivers/wps): add User-Agent and Referer headers in Link method

* fix(drivers/wps): removing NoOverwriteUpload field

---------

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
* fix(drivers/wps): correct account modes handling

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>

* feat(drivers/wps): enhance GetDetails for business account

Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>

---------

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
Co-authored-by: Copilot <copilot@github.com>
fix(about): fix large logo on about page via OpenList-Frontend#463
* feat(115_open): implement Getter interface

* chore(115_open): get parentPath move to init
* feat(s3): implement Getter interface

* update path

* rm root
* feat(webdav): implement Getter interface

* fix(webdav): update Get method to use correct path handling

Co-authored-by: Copilot <copilot@github.com>

* fix(s3): correct path handling in Get method for object retrieval

---------

Co-authored-by: j2rong4cn <j2rong@qq.com>
Co-authored-by: Copilot <copilot@github.com>
feat: allow custom share IDs

   - Change sharing ID column from char(12) to varchar(64)
   - Add new_id field to UpdateSharingReq for renaming share IDs
   - Add ID validation (max 64 chars, alphanumeric/CJK/hyphens/underscores)
   - Add conflict check when updating share ID
   - Add customize_share_id permission (bit 15)

   Closes OpenListTeam/OpenList#1806
* fix(webdav/drivers):add errors check

* chore(pkg/error):add errs.IsObjectAlreadyExists function

* chore(pkg/error):rollback error change

* chore(op/makedir):add IsObjectAlreadyExists check

* fix(driver/quark_uc):add makedir response checking

* fix(op/put):add makedir error checking

* chore(op/put):fix logic error

* fix(driver/uc):fix error resp check

* chore(op/makedir):add parentPath check

* fix(op/makedir):fix some errors

* fix(op/makedir):fix logic error

* fix(drivers/cloudreve_v4): add object existence error

---------

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
Co-authored-by: MadDogOwner <xiaoran@xrgzs.top>
* fix(fsmanage): improve path validation in FsMove, FsCopy, and FsRemove functions
* fix(driver): fix 189 & 189pc fastcopy form local storage

* fix(driver): fix 189 & 189pc fastcopy form local storage

* fix(driver): fix 189 & 189pc fastcopy form local storage
Optimize the 189pc driver to implement AccessToken login
* add LinearMemory

* replace mmap with LinearMemory

* remove unused code

* add GuardedMemory; add `min_free_memoryMB` conf

* add HybridCache and StreamBuffer

* log

* rename SizedReadWriterAt to Section

* 重构 FileStream,改用 HybridCache

* 重构 HybridCache,更新方法名并添加回滚功能;优化请求和流处理逻辑

* 重构 StreamSectionReader 接口,使用HybridCache

* 在 NewGuardedMemory 函数中添加了对 LinearMemory 的最终化处理,以确保内存释放

* .

* 优化检查逻辑

* 重命名

* 改进、重命名

* 修复

* 添加测试

* 移除HybridCacheReader并引入DynamicReadAtSeeker

* 重构缓存读取逻辑,简化代码并引入ReadFromN方法

* 优化缓存配置注释并修复下载器部分大小限制逻辑

* 优化中断逻辑

* 优化下载器代码

* 修复bug

* HybridCache添加多文件缓存模式

* 优化下载器并发,添加测试

* 修复bug

* 重命名+注释

* .

* fix(net): always cleanup downloader on interrupt

* fix(net): guard chunk enqueue with context cancel

* fix(net): update interrupt logic and add download interrupt test

* fix(test): update concurrency limit in high concurrency test

* refactor(buffer): simplify ReadAt logic

* refactor(config): update memory configuration logic

* .

---------

Co-authored-by: Suyunmeng <Susus0175@proton.me>
fix(139): remove RFC8441-incompatible Connection header

Agent-Logs-Url: https://github.com/OpenListTeam/OpenList/sessions/1c6b226d-02c4-4b43-80ad-5ab2861d30c3

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jyxjjj <16695261+jyxjjj@users.noreply.github.com>
Nostalgia and others added 26 commits September 21, 2026 16:54
- Share one admitted lifecycle policy between regular and archive links.
- Reject and release links that combine TTL caching with owned resources.
- Keep wrapper clones independent from the source cache expiration.
- Cover reuse, reference, invalidation, conflict, and clone behavior.

Co-authored-by: nostalume <nostalucent@gmail.com>
Co-authored-by: Codex <267193182+codex@users.noreply.github.com>
- Keep storage-to-tool identity in the offline tool package.
- Share settings persistence, tool initialization, and storage admission across handlers.
- Preserve endpoint payloads and unsupported-storage diagnostics with focused tests.

Co-authored-by: nostalume <nostalucent@gmail.com>
Co-authored-by: Codex <267193182+codex@users.noreply.github.com>
* fix(aliyundrive): limit callback concurrency

- Share proxy callback admission by Aliyun user identity and hold permits for complete response-body lifetimes.
- Retry only verified callback-capacity rejections while preserving direct redirects and server download limiting.
- Map exhausted temporary capacity to S3 SlowDown through the merged OpenListTeam gofakes3 module.
- Cover shared limits, lifecycle release, cancellation, retry classification, and the S3 HTTP response.

Co-authored-by: Codex <267193182+codex@users.noreply.github.com>

# Conflicts:
#	go.mod
#	go.sum
#	server/s3/pager.go

* fix(op): separate redirect and proxy link cache entries

- Include redirect mode in the link cache key for all drivers.

- Cover both redirect-to-proxy and proxy-to-redirect cache reuse.

Co-authored-by: Codex <267193182+codex@users.noreply.github.com>

* fix(proxy): close range bodies before opening next

- make ServeHTTP own each range body and preserve cleanup failures
- remove the aggregate range closer and pass range readers directly
- replace the obsolete callback transport test with focused lifecycle coverage

Co-authored-by: Codex <267193182+codex@users.noreply.github.com>

---------

Co-authored-by: nostalume <nostalucent@gmail.com>
Co-authored-by: Codex <267193182+codex@users.noreply.github.com>
Co-authored-by: PIKACHUIM <PIKACHUIM@users.noreply.github.com>
Lanzou recently changed the file share page: download params moved
into an iframe (/fn?<token>) inner page, and the download API is now
an absolute URL (https://apifile.woozooo.com/ajaxfile.php?file=N)
with new sign params (wp_sign/ajaxdata, action=downprocess).

The old findFileIDReg ('/ajaxm.php?file=N' relative path) no longer
matches, causing 'failed link: failed get link: not find file id'.

Fall back to parsing the new /fn page structure when the legacy
regex does not match. Legacy flow is kept untouched.

Signed-off-by: rzsgsfm <rzsgsfm@users.noreply.github.com>
Co-authored-by: rzsgsfm <rzsgsfm@users.noreply.github.com>
Co-authored-by: GLM (ZCode CLI) <noreply@z.ai>
QR code scans were authorized on the phone but the storage stayed stuck on
the QR page, and token-only setups failed with "params is null".

The driver used appId 8025431004 while the official PC client uses
9317140619. Tokens, sessions and QR sessions are all scoped to an appId, so
the mismatch meant the QR poll never saw status:0 and an accessToken could
not be exchanged for a sessionSecret.

- Use appId 9317140619 and version 7.2.4.0. QR state polling uses
  clientType=1; password login keeps 10020.
- Send the QR poll parameters the official client sends (cb_SaveName,
  isOauth2, state, user-finger header, logbox Referer) and poll locally
  instead of only checking once per save.
- Parse lt/reqId from the logbox redirect and paramId from appConf.do. The
  new login page no longer embeds them as inline variables; the old inline
  format is still supported.
- Implement the -133 second device verification via
  sendSmsCodeForSecondAuth/submitForSecondAuth. That endpoint has no
  dedicated SMS field: the code goes into epd, encrypted with the same
  public key used for the password. Persist the DEVICEID cookie so the
  verification only happens once.
- Detect refreshToken.do failures. It reports them as HTTP 200 with a
  result field, so SetError never fired and a failed refresh was treated as
  success, surfacing later as a misleading "params is null".
- username/password are no longer required, so token-only storages save
  without placeholders. clientSn/jgOpenId are optional and only sent when
  configured; user-finger is generated once per storage.
- Return named errors instead of panicking when the login page changes shape.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…3083)

* fix(189pc): preserve family transfer extension

- Preserve the source extension in family-transfer temporary upload names.
- Fall back to .transfer for extensionless source files.
- Add unit coverage for extension handling.

Co-authored-by: Codex <267193182+codex@users.noreply.github.com>

* fix(189pc): include extension in upload progress key

- Separate resumable upload state for identical content with different extensions.
- Preserve resume behavior when only the temporary file name changes.
- Add unit coverage for both cases.

Co-authored-by: Codex <267193182+codex@users.noreply.github.com>

---------

Co-authored-by: Codex <267193182+codex@users.noreply.github.com>
ListObjects with a delimiter returned directories as common prefixes
without the trailing delimiter ("base/20261009T020008" instead of
"base/20261009T020008/"). S3 always includes it, and clients such as
barman-cloud (used by CloudNativePG) ignore prefixes without it, so
backups stored through the S3 gateway could not be listed.

Append "/" to common prefixes, as rclone serve s3 did in a3f3fc61e.

Also sort directory entries as if directories carried their trailing
slash, as rclone did in 04697cc02, so keys are emitted in S3 order
("b.txt" before "b/"). The marker-based paging added in #2968 relies on
that order; without it a listing resumed from a marker skips keys when
a directory "b" sits next to a file "b.txt". This already affected
recursive listings and would affect delimited ones once prefixes end
with "/".

Signed-off-by: zeroornull <18650317+zeroornull@users.noreply.github.com>
Co-authored-by: zeroornull <18650317+zeroornull@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* fix(webdav): honor conditional PUT requests

- Reuse HTTP precondition checks for existing and missing upload targets
- Support repeated entity-tag headers and reject empty If-Match lists
- Preserve nanosecond precision in metadata-based ETags
- Return 204 for overwrites and retain ETags in buffered PUT responses
- Add regression tests for preconditions, ranges, and ETag changes

Co-authored-by: Codex <267193182+codex@users.noreply.github.com>
Signed-off-by: jyxjjj <16695261+jyxjjj@users.noreply.github.com>

* fix(webdav): stabilize fallback ETags

- Use second-precision modification times for reproducible fallback ETags
- Cover ETag stability across cache refresh timestamp normalization

Co-authored-by: Codex <267193182+codex@users.noreply.github.com>
Signed-off-by: jyxjjj <16695261+jyxjjj@users.noreply.github.com>

---------

Signed-off-by: jyxjjj <16695261+jyxjjj@users.noreply.github.com>
Co-authored-by: Codex <267193182+codex@users.noreply.github.com>
feat(139): raise single file upload limit to 500 GB

* Use the PC client type in X-Yun-Client-Info to allow 500 GB uploads

Co-authored-by: Codex <267193182+codex@users.noreply.github.com>
…te (#3147)

fix(onedrive): refresh root folder after storage update

- Clear the cached OneDrive root when a driver is dropped and reinitialized.
- Invalidate storage directory and detail caches for every configuration update.

Co-authored-by: Codex <267193182+codex@users.noreply.github.com>
* fix(s3): sign content type for direct uploads

- Include the inferred MIME type in presigned PutObject requests
- Return the signed Content-Type header for frontend uploads

Co-authored-by: Codex <267193182+codex@users.noreply.github.com>

* fix(drivers/s3): use client content type for direct uploads

- Accept and validate the client-provided direct upload media type
- Pass the type to the S3 signer through a typed context key
- Default missing types to application/octet-stream

Co-authored-by: Codex <267193182+codex@users.noreply.github.com>

---------

Co-authored-by: Codex <267193182+codex@users.noreply.github.com>
- Defer closing response body when handling HTTP error responses
- Check error when initializing `gzip.Reader` to prevent panics from invalid gzip streams
- Avoid unsafe type assertion during gzip reader cleanup
- 以 -s ours 假合并 v4.2.5 重接祖先(main 经 #31 squash 采纳 4.2.5 内容但历史断裂),使本次 3-way 基点为 v4.2.5,官方 85 个新提交(v4.2.6 的 44 个 + 其后 41 个)正常并入
- 依赖: go.mod/go.sum 取官方版本并保留 fork 独有依赖(power721/115driver、itsHenry35/gofakes3),go mod tidy 重算
- net: 移植官方 #3090 两处修复(初始 sendChunkTask 错误透传真实原因、worker 槽位在分片入队后扣减),保留 fork 多账号分片下载器架构;顺带修复移植初期的双重 spawn 回归(官方 request_cancel_test 抓出)
- fs: op.Link 保留 fork nil 防御检查并采纳官方 #3101 link cache 生命周期(proxy/redirect typeKey 分离 + ol.acquire)
- proxy/server: 保留 fork proxyRangeReader(混淆 MKV 探测)与 model.RangeReaderIF 直传适配;fsmanage copy/move/remove 在 fork 校验循环上叠加官方 checkRelativePath 加固;search 保留 fork 后过滤结构并移植官方目录节点 metaPath 修正
- 驱动: 139 采纳官方 cookie 快登/密码登录流程(去掉官方 139 share 模式闸门);189pc 采纳官方 PC 客户端登录对齐(轮询扫码/SmsCode/AccessToken)并保留 fork CAS 上传返回值;aliyundrive_open 保留 fork 直链+#storageId 与双 token Init,官方 callback.go 休眠保留;guangyapan 保留 fork 重写的上传/离线实现(官方 md5 秒传/multipart 进度属被替换的上游机制,未移植);local 取官方 PDFThumbnail 并保留 fork CAS 三字段
- 离线下载: 保留 fork 自有 SetGuangYaPan(含存储驱动校验),丢弃官方重复 handler
- CI/build: workflow 全保 fork 身份(自有 DockerHub/触发策略),build.sh 保 fork gitAuthor;官方 beta_release/sync_repo/test_docker 维持删除,issue_pr_comment 维持保留
- 测试: 修复官方两个自带坏测试(onedrive_sharelink 缺 conf 初始化 panic、search_test outside-base-path 用例数据与断言矛盾,均经官方 HEAD 实证同样失败);删除断言官方 callback 取链语义的 TestLinkSeparates(fork 为直链设计);fork 189pc/139 等全部包绿,唯 index115/bootstrap/conf/aria2 四包与 main 基线一致的存量环境性失败
@github-actions

Copy link
Copy Markdown

⚠️ PR 标题需以 feat(): , docs(): , fix(): , style(): , refactor(): , chore(): 其中之一开头,例如:feat(component): 新增功能。
⚠️ The PR title must start with feat(): , docs(): , fix(): , style(): , or refactor(): , chore(): . For example: feat(component): add new feature.

如果跨多个组件,请使用主要组件作为前缀,并在标题中枚举、描述中说明。
If it spans multiple components, use the main component as the prefix and enumerate in the title, describe in the body.

…的 __puus 之前只更新匿名兜底 shareCookie,取链账号 Cookie 停在登录时刻——API 域宽松仍出链、CDN 下载域强校验判失效 412,重扫码恢复一天循环复发(报表人实测同直链仅换新 __puus 即 206)。修复四点:①requestAt 增加 onPuus 回调,免转存取链(主账号)/requestSharePc(绑定账号,网盘+TV binding 各实现 syncPuus)把轮换值经 saveQuarkPuus/saveTVPuus 并入账号当前 Cookie 并 SaveCookie 持久化+回写 AT,值未变跳过防并发重复落库;②speedupDownload 返回响应轮换的 __puus、speedupLink 全程改读账号实时 Cookie(转存流程可能刚轮换,绑定快照带旧值被拒);③quark_uc/quark_uc_tv 删掉 else 分支按请求头回写 __puus——RestyClient 无 cookie jar,请求头恒为构建时快照,该分支唯一可触发场景是并发下把刚轮换的新值覆盖回旧值(2025-08 大合并带入非定向修复);④SyncTokens 检查 HTTP 状态,非 2xx/失败记 WARN 重试一次——此前静默吞掉,AT 重启会用旧值重建 storage 覆盖新值。新增 requestAt 轮换回传 httptest 回归测试
@power721
power721 merged commit 4184992 into main Oct 19, 2026
2 checks passed
@power721
power721 deleted the merge/openlist-post-4.2.5 branch October 19, 2026 11:46
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.