修复邮箱验证链接安全问题 - #676
Open
hans362 wants to merge 4 commits into
Open
Conversation
|
#675 是我应急修复漏洞,用AI跑的。对目前正式版皮肤站验证链接逻辑进行分析,可以发现,其 我们的背景情况是学生社团,实名游玩,高校联合,因此这个漏洞对我们来说可以说是致命的。 #675 中增加了一个强制验证机制,所有的签名链接都要写在数据库users表里面,一次一用。又改变了链接的算法,把生成链接的时间戳也纳入到了生成算法中,这样保证了每次生成的链接都不与上次的一致。但是这样修理又出现了几个问题,一是修复太复杂;二是写坏了 实在是没办法了,我们缺少技术人员,遇到这种问题只能先写个石山顶一下了。还得大佬们出山Orz。给大家添麻烦了。 |
tnqzh123
requested changes
Mar 9, 2026
tnqzh123
left a comment
Member
There was a problem hiding this comment.
考虑使用 SHA256 而不是 SHA1?PHP 的 hash 就能生成 SHA256 Hash
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.
@shhzhang 发现当前邮箱验证链接存在以下安全问题:
其中问题2比较严重,如果用户在收到验证链接后故意不完成验证,又把邮箱改成其他任意邮箱,之前收到的验证链接仍然能继续使用,从而可以绑定任意邮箱。
#675 的修复似乎仅在签名中增加了时间戳,只解决了问题1,且修复方式较为复杂,本 PR 使用
temporarySignedRoute进行修复。