mirror of
1
Fork 0
forgejo/routers/web
Gusted 1770117178
fix: extend `forgejo_auth_token` table
- Add a `purpose` column, this allows the `forgejo_auth_token` table to
be used by other parts of Forgejo, while still enjoying the
no-compromise architecture.
- Remove the 'roll your own crypto' time limited code functions and
migrate them to the `forgejo_auth_token` table. This migration ensures
generated codes can only be used for their purpose and ensure they are
invalidated after their usage by deleting it from the database, this
also should help making auditing of the security code easier, as we're
no longer trying to stuff a lot of data into a HMAC construction.
-Helper functions are rewritten to ensure a safe-by-design approach to
these tokens.
- Add the `forgejo_auth_token` to dbconsistency doctor and add it to the
`deleteUser` function.
- TODO: Add cron job to delete expired authorization tokens.
- Unit and integration tests added.

(cherry picked from commit 1ce33aa38d)

v9: Removed migration - XORM can handle this case automatically without
migration. Add `DEFAULT 'long_term_authorization'`.
2024-11-15 11:33:17 +01:00
..
admin Remove urls from translations (#31950) 2024-09-12 17:28:58 +05:00
auth fix: extend `forgejo_auth_token` table 2024-11-15 11:33:17 +01:00
devtest Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
events Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
explore For consistency make repo search sort options case sensitive (#31951) 2024-09-09 20:54:47 +02:00
feed fix: don't show truncated comments in RSS/Atom feeds 2024-10-22 16:50:57 +00:00
healthcheck Add health-check test 2024-04-06 00:34:55 +02:00
misc Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
org [BUG] Don't allow owner team with incorrect unit access 2024-10-14 19:59:17 +00:00
repo fix: don't show private forks in forks list 2024-11-15 11:32:09 +01:00
shared feat(UI): add package counter to repo/user/org overview pages 2024-07-31 12:40:24 +02:00
user fix: extend `forgejo_auth_token` table 2024-11-15 11:33:17 +01:00
base.go Fix panic in storageHandler (#27446) 2023-10-06 13:23:14 +00:00
githttp.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
goget.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
home.go migrate some more "OptionalBool" to "Option[bool]" (#29479) 2024-03-06 12:10:44 +08:00
metrics.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
nodeinfo.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
swagger_json.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
web.go fix: require code permissions for branch feed 2024-11-15 11:32:24 +01:00
webfinger.go Enable more `revive` linter rules (#30608) 2024-04-28 15:39:00 +02:00