fix(world-packs): zip-slip + 冲突静默覆盖 + DRY enable-list(审查 169488a) - #51
Merged
Tanya7z merged 2 commits intoJul 23, 2026
Merged
Conversation
审查 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>
4 tasks
Tanya7z
marked this pull request as ready for review
July 23, 2026 15:56
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. |
This was referenced Jul 23, 2026
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


Summary
审查
main@169488a(feat:强化资源包管理器功能)后的可验证补丁。ootb 该 push 已绿;本 PR 修 SOLID/安全问题。BLOCKER
extractArchiveToTemp/ BDSextractZipToBds未校验条目路径;抽出bds-tools/src/zipx.ts为单一权威(DRY),拒绝../ 绝对路径 / 盘符。installPackDirectory仅在readPackManifestInfo成功时检测 folderName 冲突;残缺 manifest 同名目录会被无提示覆盖。现同 folderName 一律 conflict。MAJOR
packs doctor硬编码world_*_packs.json;改为listWorldEnableEntries→readWorldPackList。listInstalledWorldPacksfallback 路径改用同一enabledMap.has契约。MINOR
resolveSdkPackageRoot优先使用本 commit 已暴露的@sfmc-bds/sdk/package.jsonexport。Test plan
npm run build --workspaces --if-presentcd bds-tools && npm test(含 zipx + conflict 新测,18/18)cd sfmc && npm run typecheck