Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-24 18:56:11 +01:00
forgejo/services/mailer
Gusted 9508aa7713
Improve usage of HMAC output for mailer tokens
- 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.
2024-11-15 10:59:36 +01:00
..
incoming Update module github.com/jhillyerd/enmime to v2 2024-10-23 06:04:11 +00:00
token Improve usage of HMAC output for mailer tokens 2024-11-15 10:59:36 +01:00
mail.go fix: extend forgejo_auth_token table 2024-11-15 10:59:36 +01:00
mail_admin_new_user.go Enable unparam linter (#31277) 2024-06-16 13:42:58 +02:00
mail_admin_new_user_test.go chore: remove extra go-sqlite3 imports 2024-09-06 09:36:08 +00:00
mail_auth_test.go [MAIL] Use correct function in mail footer 2024-07-26 15:16:54 +02:00
mail_comment.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
mail_issue.go mail issue: Display issue type in email header 2024-10-19 21:25:54 +02:00
mail_release.go Add option to change mail from user display name (#31528) 2024-07-22 15:44:13 +02:00
mail_repo.go Add option to change mail from user display name (#31528) 2024-07-22 15:44:13 +02:00
mail_team_invite.go Refactor locale&string&template related code (#29165) 2024-02-16 15:20:52 +01:00
mail_test.go mail issue: Display issue type in email header 2024-10-19 21:25:54 +02:00
mailer.go Add option for mailer to override mail headers (#27860) 2024-06-09 11:13:39 +02:00
mailer_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
main_test.go [SECURITY] Notify users about account security changes 2024-07-23 18:31:47 +02:00
notify.go [GITEA] notifies admins on new user registration 2024-02-05 16:09:28 +01:00