mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-21 05:03:07 +00:00
Incoming email reply tokens are embedded in every notification email and stay valid for a year. `DecodeToken` verifies them with `user.Rands`, which is not rotated when an admin disables sign-in or the account is deactivated, and `ReplyHandler` only checks repo read permission. A suspended user could therefore keep posting comments, review comments and attachments on any public repo by replying to old notifications, while the web, API, git and package paths all refuse them. `DecodeToken` now rejects tokens of users who are inactive or prohibited from signing in, which covers every incoming mail handler. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>