Repository navigation
fix(pay): 企业付款到银行卡使用后立即删除临时公钥文件,避免运行期间临时文件堆积 - #4143
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🟢 Approval recommended
变更范围明确,公钥读取流在删除前已关闭,正常及异常路径均执行清理,未发现阻断性问题。
No open issues 🎉
What changed in this PR
本次变更调整微信支付模块企业付款到银行卡的临时公钥文件清理时机,减少长期运行时的临时文件堆积。
变更:
- 将 JVM 退出时清理改为在
payBank()的finally中尝试立即删除。 - 覆盖临时文件创建成功后的正常返回及异常路径,保持加密、签名和支付流程不变。
审查基于静态证据,未运行自动化测试或真实支付调用。
| File | Description |
|---|---|
| weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/EntPayServiceImpl.java | 使用 try/finally 清理临时公钥文件。 |
Review effort: Balanced
🤖 Augment PR Summary将 🤖 Was this summary useful? React with 👍 or 👎 |
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
企业付款到银行卡的
payBank()原先仅在 JVM 退出时删除临时公钥文件,长期运行时可能持续堆积。改为在finally中删除,覆盖正常返回及异常路径。迁移自 Gitee PR #181,原作者为 xy。完整保留原提交
cb2eeaf94b20300678dcd7a0771ad647f2968d29,未修改代码、作者、提交者或提交时间。Evidence
buildPublicKeyFile()成功返回后,正常返回及加密、签名、请求、响应校验异常均执行清理;公钥读取流由 try-with-resources 关闭。git diff --check;未运行自动化测试或真实支付调用。Merge Danger
Door: two-way
可通过回退该提交撤销。
Blast Radius: 支付
仅影响企业付款到银行卡的临时公钥文件清理。
File.delete()返回值仍未检查,清理失败时可能遗留文件;本次迁移保留原实现,供后续审查处理。