fix:重构 QQ 系统,并修复了一些安全问题 - #1411
Open
Sualiu wants to merge 2 commits into
Open
Conversation
Closed
|
这个 PR 已经 45 天没有任何活动了,将被标记为过时 stale 。 删除 stale 的标签或评论,否则将在 10 天内关闭。 |
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.
原 QQ 方案使用 AES 加密 QQ 号后拼接到 URL,再由后端解密获取。这种“自加密自解密”方式保护力度弱,且原实现存在 IV 不匹配、密钥未定义等严重 Bug。此外,原代码存在 SSRF、XSS 及直接操作 $_GET 等安全问题。
几乎可以说原有方案是一个半成品。
本 PR 废弃了加密方案,改用 comment_id 代理模式,彻底避免 QQ 号出现在任何 URL 中,同时修复了多项安全漏洞并引入文件缓存机制。
所有变更经过了自动化测试,代码由 AI 模型 GLM-5.2 辅助编写, 人工审阅,未发现异常,符合 WordPress 官方相关最佳实践要求。
主要变更
修复的问题
i18
因需进一步确认,未同步更新翻译主题设置框架功能简介。
兼容性