0
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-02-14 19:40:48 -05:00
forgejo/services
Gusted 5b53a150c0
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.

(cherry picked from commit 9508aa7713)
2024-11-15 12:02:09 +01:00
..
actions enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
agit fix(agit): run full pr checks on force-push 2024-08-13 18:26:33 +00:00
asymkey enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
attachment enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
auth fix: Fix to delete cookie when AppSubURL is non-empty (#30375) (#30469) 2024-04-21 17:39:14 +02:00
automerge Simplify how git repositories are opened (#28937) 2024-01-27 21:09:51 +01:00
context enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
contexttest enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
convert enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
cron enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
doctor fix: correct doctor commands and rename to forgejo 2024-08-27 01:44:00 +00:00
externalaccount Final round of db.DefaultContext refactor (#27587) 2023-10-14 08:37:24 +00:00
feed enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
forgejo enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
forms Return access_denied error when an OAuth2 request is denied (#30974) 2024-06-05 17:19:22 +02:00
gitdiff enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
indexer Update issue indexer after merging a PR (#30715) 2024-05-14 16:00:57 +02:00
issue enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
lfs Fix #31185 try fix lfs download from bitbucket failed (#31201) 2024-08-18 07:01:03 +02:00
mailer Improve usage of HMAC output for mailer tokens 2024-11-15 12:02:09 +01:00
markup enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
migrations enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
mirror test(mock): DeletePushMirrors & AddPushMirrorRemote 2024-06-02 15:45:31 +00:00
notify Clean up log messages (#30313) 2024-04-15 16:11:14 +02:00
org enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
packages [SEC] Ensure propagation of API scopes for Conan and Container authentication 2024-08-28 08:44:58 +00:00
pull fix(agit): run full pr checks on force-push 2024-08-13 18:26:33 +00:00
release enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
repository security: add permission check to 'delete branch after merge' 2024-10-28 06:32:10 +01:00
secrets Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
task Fix incorrect ctx usage in defer function (#27740) 2023-10-22 14:12:27 +00:00
uinotification Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00
user enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
webhook enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
wiki enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00