Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-12-01 14:26:10 +01:00
forgejo/routers/web/user
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
..
setting fix: extend forgejo_auth_token table 2024-11-15 11:33:17 +01:00
avatar.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
code.go Unify search boxes (#29530) 2024-03-20 12:31:05 +00:00
home.go feat: set created_by as the default filter for /issues and /pulls (#5286) 2024-09-13 12:55:39 +00:00
home_test.go feat: set created_by as the default filter for /issues and /pulls (#5286) 2024-09-13 12:55:39 +00:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
notification.go Add missing repository type filter parameters to pager (#31832) 2024-08-19 09:26:34 +02:00
package.go style: change one argument switch to if 2024-08-18 16:20:26 +02:00
profile.go nix wording nit in todo code comment 2024-09-09 20:54:39 +02:00
search.go migrate some more "OptionalBool" to "Option[bool]" (#29479) 2024-03-06 12:10:44 +08:00
stop_watch.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
task.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00