Skip to content

fix(world-packs): zip-slip + 冲突静默覆盖 + DRY enable-list(审查 169488a) - #51

Merged
Tanya7z merged 2 commits into
mainfrom
cursor/bc-25383906-c31f-43b0-b61d-0924e3f17559-2138
Jul 23, 2026
Merged

fix(world-packs): zip-slip + 冲突静默覆盖 + DRY enable-list(审查 169488a)#51
Tanya7z merged 2 commits into
mainfrom
cursor/bc-25383906-c31f-43b0-b61d-0924e3f17559-2138

Conversation

@cursor

@cursor cursor Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

审查 main@169488a(feat:强化资源包管理器功能)后的可验证补丁。ootb 该 push 已绿;本 PR 修 SOLID/安全问题。

BLOCKER

  1. Zip-slipextractArchiveToTemp / BDS extractZipToBds 未校验条目路径;抽出 bds-tools/src/zipx.ts 为单一权威(DRY),拒绝 .. / 绝对路径 / 盘符。
  2. 静默覆盖installPackDirectory 仅在 readPackManifestInfo 成功时检测 folderName 冲突;残缺 manifest 同名目录会被无提示覆盖。现同 folderName 一律 conflict。

MAJOR

  1. Demeter/DRYpacks doctor 硬编码 world_*_packs.json;改为 listWorldEnableEntriesreadWorldPackList
  2. LSPlistInstalledWorldPacks fallback 路径改用同一 enabledMap.has 契约。
  3. DRY/OCP — cli-pack-manager world-packs 动词合并单次 dynamic import。

MINOR

  1. resolveSdkPackageRoot 优先使用本 commit 已暴露的 @sfmc-bds/sdk/package.json export。

Test plan

  • npm run build --workspaces --if-present
  • cd bds-tools && npm test(含 zipx + conflict 新测,18/18)
  • cd sfmc && npm run typecheck
  • CI ootb on this PR
Open in Web View Automation 

审查 main@169488a「强化资源包管理器」后补丁:
- BLOCKER: 抽出 zipx 安全解压,world-packs/check-update 共用(拒 .. / 绝对路径)
- BLOCKER: installPackDirectory 同 folderName 在旧包不可识别时也返回 conflict
- MAJOR: doctor 经 listWorldEnableEntries,不再硬编码 world_*_packs.json
- LSP: listInstalledWorldPacks 统一用 enabledMap.has
- DRY/OCP: cli world-packs 动词合并单次 import;resolveSdk 优先 package.json export

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查跟进(main@8d206ff

本 PR 与后续 updater 改动(check-update.ts 进度条 / SFMC_UPDATE_RESULT)产生冲突。

安全修复(zipx / 冲突静默覆盖 / enable-list DRY)已 rebase 并并入 #52 ,建议关闭本 PR,以 #52 为准。

View PR

Open in Web View Automation 

Sent by Cursor Automation: SFMC-Review

@Tanya7z
Tanya7z marked this pull request as ready for review July 23, 2026 15:56
@cursor

cursor Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@Tanya7z
Tanya7z merged commit babae0b into main Jul 23, 2026
1 check passed
@Tanya7z
Tanya7z deleted the cursor/bc-25383906-c31f-43b0-b61d-0924e3f17559-2138 branch July 23, 2026 15:57
cursor Bot pushed a commit that referenced this pull request Jul 23, 2026
审查 main@e95d81e ootb 红(#51+#52 合并残留)后 #54 已修 TS2300;
本补丁收敛遗留 SOLID 债:
- MAJOR(DRY): tools/fetch-module 解压委托 @sfmc-bds/bds-tools/zipx
- MAJOR(LSP): readWorldPackListResult 恢复 doctor parseFail 信号
- MINOR(DRY): cmdUpdate 直接 stripTaskbarOsc,去掉无用 stripOsc 别名

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
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.

2 participants