1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-27 09:11:53 -05:00
forgejo/routers/web/auth
Gusted 51988ef52b
[GITEA] rework long-term authentication
- The current architecture is inherently insecure, because you can
construct the 'secret' cookie value with values that are available in
the database. Thus provides zero protection when a database is
dumped/leaked.
- This patch implements a new architecture that's inspired from: [Paragonie Initiative](https://paragonie.com/blog/2015/04/secure-authentication-php-with-long-term-persistence#secure-remember-me-cookies).
- Integration testing is added to ensure the new mechanism works.
- Removes a setting, because it's not used anymore.

(cherry-pick from eff097448b)

Conflicts:

	modules/context/context_cookie.go
	trivial context conflicts

	routers/web/web.go
	ctx.GetSiteCookie(setting.CookieRememberName) moved from services/auth/middleware.go
2023-10-05 08:50:54 +02:00
..
2fa.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
auth.go [GITEA] rework long-term authentication 2023-10-05 08:50:54 +02:00
linkaccount.go Replace interface{} with any (#25686) (#25687) 2023-07-04 23:41:32 -04:00
main_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
oauth.go [GITEA] rework long-term authentication 2023-10-05 08:50:54 +02:00
oauth_test.go Replace interface{} with any (#25686) (#25687) 2023-07-04 23:41:32 -04:00
openid.go Replace interface{} with any (#25686) (#25687) 2023-07-04 23:41:32 -04:00
password.go Split "modules/context.go" to separate files (#24569) 2023-05-08 17:36:54 +08:00
webauthn.go Replace deprecated Webauthn library (#22400) 2023-01-11 21:51:00 -05:00