forgejo/routers/web
Gusted 06556abb6d fix: delay deleting authorization token (#6937)
- 1ce33aa38d extended the LTA table with a purpose column so it could be extended to other tokens. However some are single-use tokens and should be deleted after use.
- This did not result in a good UX for activating user as they needed to also fill in their passwords and in the case that the password was incorrect the token would no longer be usable.
- This patch modifies the code to allow for a little delay before deleting authorization tokens to do additional verification such as the password check. This cannot be done before the authorization token check as that the authorization token determines who the user is.
- Resolves forgejo/forgejo#6912
- Adjusted existing unit test.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6937
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-02-17 11:09:33 +00:00
..
admin chore: load 2fa status for user search when needed (#6727) 2025-01-29 17:57:55 +00:00
auth fix: delay deleting authorization token (#6937) 2025-02-17 11:09:33 +00: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 fix: set explore pages to configurable default sort (#6708) 2025-01-31 10:38:03 +00:00
feed Add pubdate for repository rss and add some tests (#33411) 2025-02-02 12:01:29 +01:00
healthcheck Add health-check test 2024-04-06 00:34:55 +02:00
misc fix: Preview picture not visible on Markdown file (#5781) 2024-11-23 15:00:18 +00:00
org fix(sec): permission check for project issue 2025-02-08 07:22:10 +00:00
repo Move gitgraph from modules to services layer (#33527) 2025-02-09 10:20:47 +01:00
shared fix(sec): web route update and delete runner variables 2025-02-08 07:21:14 +00:00
user feat: add pronoun privacy option (#6773) 2025-02-15 13:07:15 +00:00
base.go Fix missing signature key error when pulling Docker images with SERVE_DIRECT enabled (#32365) 2024-11-05 09:33:15 +01: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 Rewrite OpenGraph Header 2025-01-01 20:43:20 +01: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 Update 2024-12-18 22:33:22 +01:00
webfinger.go Enable more revive linter rules (#30608) 2024-04-28 15:39:00 +02:00