Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-24 10:46:10 +01:00
forgejo/models/user
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
..
avatar.go Fix context cache bug & enable context cache for dashabord commits' authors(#26991) (#27017) 2023-09-20 12:50:46 +02:00
badge.go Remove most path-based golangci exclusions (#24214) 2023-04-19 22:08:01 -04:00
block.go [MODERATION] add user blocking API 2023-07-17 00:26:42 +02:00
block_test.go [MODERATION] add user blocking API 2023-07-17 00:26:42 +02:00
email_address.go check blocklist for emails when adding them to account (#26812) (#26831) 2023-09-08 08:09:18 +02:00
email_address_test.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
error.go Refactor rename user and rename organization (#24052) 2023-05-21 23:13:47 +08:00
external_login_user.go Replace interface{} with any (#25686) (#25687) 2023-07-04 23:41:32 -04:00
follow.go [MODERATION] organization blocking a user (#802) 2023-07-17 00:26:42 +02:00
follow_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
list.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
main_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
must_change_password.go Add command to bulk set must-change-password (#22823) 2023-02-14 16:12:19 -06:00
openid.go Use ErrInvalidArgument in packages (#22268) 2022-12-31 12:49:37 +01:00
openid_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
redirect.go Fix bug when change user name (#25637) (#25646) 2023-07-03 14:23:35 +03:00
redirect_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
search.go Add login name and source id for admin user searching API (#23376) 2023-03-15 19:53:01 +08:00
setting.go Add Debian package registry (#24426) 2023-05-02 12:31:35 -04:00
setting_keys.go Show outdated comments in files changed tab (#24936) (#25428) 2023-06-22 08:34:42 +00:00
setting_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
user.go [GITEA] rework long-term authentication 2023-10-05 08:50:54 +02:00
user_system.go [BRANDING] reserve forgejo-actions username 2023-07-17 00:25:56 +02:00
user_test.go [MODERATION] organization blocking a user (#802) 2023-07-17 00:26:42 +02:00
user_update.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00