mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-23 19:11:58 +01:00
9508aa7713
- If the incoming mail feature is enabled, tokens are being sent with outgoing mails. These tokens contains information about what type of action is allow with such token (such as replying to a certain issue ID), to verify these tokens the code uses the HMAC-SHA256 construction. - The output of the HMAC is truncated to 80 bits, because this is recommended by RFC2104, but RFC2104 actually doesn't recommend this. It recommends, if truncation should need to take place, it should use max(80, hash_len/2) of the leftmost bits. For HMAC-SHA256 this works out to 128 bits instead of the currently used 80 bits. - Update to token version 2 and disallow any usage of token version 1, token version 2 are generated with 128 bits of HMAC output. - Add test to verify the deprecation of token version 1 and a general MAC check test. |
||
---|---|---|
.. | ||
incoming | ||
token | ||
mail.go | ||
mail_admin_new_user.go | ||
mail_admin_new_user_test.go | ||
mail_auth_test.go | ||
mail_comment.go | ||
mail_issue.go | ||
mail_release.go | ||
mail_repo.go | ||
mail_team_invite.go | ||
mail_test.go | ||
mailer.go | ||
mailer_test.go | ||
main_test.go | ||
notify.go |