Repository navigation
fix(mail): 升级内嵌邮件解析依赖并校验发布产物 - #223
Merged
Merged
Conversation
This was referenced Oct 25, 2026
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.
邮件插件将协议库与解析器嵌入 JS,下游的 lockfile / overrides 无法替换其中的旧版本。特制邮件地址可阻塞解析线程,影响已发布的 0.2.1、0.2.2。此修复将插件升级为 0.2.3,更新 Nodemailer 10.2.1、Mailparser 3.12.4,并更新同样进入 bundle 的间接依赖 ip-address 10.7.5。
对应公告:GHSA-v53p-9fqp-m79j、GHSA-prgh-xp8r-p3m5。问题由中国科大词元工坊反馈。
构建从实际 JS sourcemap 生成包含嵌套版本的依赖清单,查询 npm 公告;高危/严重漏洞、查询失败或清单不一致均阻止检查通过。npm 包携带清单,统一打包/发布器再核对所有 JS(包括延迟加载 chunk)的 SHA-256,防止只检查声明依赖或检查后换入旧产物。客户端装配锁将在 npm 发布核验后更新。
验证:邮件包完整检查通过(32 项测试、类型检查、DSH 兼容、延迟加载、许可证及文档);实际打包的 47 项依赖当前无命中公告;统一发布检查 7 项测试通过,能拒绝缺失清单、遗漏 chunk 和内容被替换的压缩包。针对真实协议 bundle 使用本机 IMAP/SMTP 桩测试:旧包解析约 280 KB 的合成邮件超过 15 秒截止时间、另一份约 650 KB 邮件约 4.4 秒;修复后分别约 26 / 45 毫秒,普通邮件前后读取及本机模拟发送通过。确认 EXAMINE / BODY.PEEK、不执行 STORE / EXPUNGE。测试不连接真实邮箱或发送外部邮件,不代替真实邮箱服务验收。