mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-19 17:43:58 +09:00
Backport #39833 by @basavaraj-sm05 Incoming email reply tokens stay valid for a year and are verified with `user.Rands`, which is not rotated when an account is deactivated or prohibited from signing in. A suspended user could therefore keep commenting on public repos by replying to old notifications. `DecodeToken` now rejects tokens of organizations, inactive users and users prohibited from signing in, which covers every incoming mail handler. Co-authored-by: Basavaraj S m <basavaraj@digiscrypt.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>