1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-20 07:38:28 +00:00
forgejo/modules
Gusted 7ad51b9f8d
[SECURITY] Rework long-term authentication
- This is a 'front-port' of the already existing patch on v1.21 and
v1.20, but applied on top of what Gitea has done to rework the LTA
mechanism. Forgejo will stick with the reworked mechanism by the Forgejo
Security team for the time being. The removal of legacy code (AES-GCM) has been
left out.
- 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 picked from commit e3d6622a63)
(cherry picked from commit fef1a6dac5)
(cherry picked from commit b0c5165145)
2023-12-11 14:48:37 +01:00
..
actions [CI] Search .forgejo/workflows first 2023-12-11 13:55:27 +01:00
activitypub Upgrade to golangci-lint@v1.55.0 () 2023-10-24 02:54:59 +00:00
analyze Rename code_langauge.go to code_language.go () 2023-08-07 15:00:53 -04:00
assetfs Use Set[Type] instead of map[Type]bool/struct{}. () 2023-08-30 06:55:25 +00:00
auth [SECURITY] default to pbkdf2 with 320,000 iterations 2023-12-11 14:48:36 +01:00
avatar Remove nfnt/resize and oliamb/cutter () 2023-07-20 19:52:42 +08:00
base Replace interface{} with any () 2023-07-04 18:36:08 +00:00
cache improve unit test for caching () 2023-07-27 22:24:40 +02:00
charset Replace interface{} with any () 2023-07-04 18:36:08 +00:00
container
context [SECURITY] Rework long-term authentication 2023-12-11 14:48:37 +01:00
contexttest Replace assert.Fail with assert.FailNow () 2023-10-11 11:02:24 +00:00
csv
doctor Fix delete-orphaned-repos () 2023-11-24 14:46:19 +00:00
emoji Update emoji set to Unicode 15 () 2023-06-29 16:29:48 +00:00
eventsource Final round of db.DefaultContext refactor () 2023-10-14 08:37:24 +00:00
generate Handle base64 decoding correctly to avoid panic () 2023-08-14 10:30:16 +00:00
git Make gogit Repository.GetBranchNames consistent () 2023-12-07 12:08:17 -05:00
gitgraph More db.DefaultContext refactor () 2023-09-29 12:12:54 +00:00
graceful Refactor graceful manager to use shared code () 2023-11-24 14:21:46 +00:00
hcaptcha
highlight Upgrade go dependencies () 2023-07-14 11:00:31 +08:00
hostmatcher Support allowed hosts for webhook to work with proxy () 2023-10-18 09:44:36 +00:00
html Refactor backend SVG package and add tests () 2023-08-05 04:34:59 +00:00
httpcache Less naked returns () 2023-07-07 05:31:56 +00:00
httplib Less naked returns () 2023-07-07 05:31:56 +00:00
indexer [CI] disable meilisearch/elasticsearch test, no server yet in CI 2023-12-11 13:55:27 +01:00
issue/template Replace interface{} with any () 2023-07-04 18:36:08 +00:00
json Replace interface{} with any () 2023-07-04 18:36:08 +00:00
label
lfs Upgrade to golangci-lint@v1.55.0 () 2023-10-24 02:54:59 +00:00
log Reduce some allocations in type conversion () 2023-08-29 00:43:16 +08:00
markup Use restricted sanitizer for repository description () 2023-11-23 16:34:25 +00:00
mcaptcha
metrics Reduce usage of db.DefaultContext () 2023-09-14 17:09:32 +00:00
migration Replace interface{} with any () 2023-07-04 18:36:08 +00:00
nosql Update tool dependencies, lock govulncheck and actionlint () 2023-07-09 11:58:06 +00:00
options
packages Close all hashed buffers () 2023-10-25 21:24:24 +02:00
paginator
pprof
private [CLI] implement forgejo-cli 2023-12-11 13:55:27 +01:00
process Replace assert.Fail with assert.FailNow () 2023-10-11 11:02:24 +00:00
proxy
proxyprotocol
public Serve pre-defined files in "public", add "security.txt", add CORS header for ".well-known" () 2023-07-21 12:14:20 +00:00
queue [CI] disable redis test, no redis server yet in CI 2023-12-11 13:55:27 +01:00
recaptcha
references Replace 'userxx' with 'orgxx' in all test files when the user type is org () 2023-09-14 02:59:53 +00:00
regexplru Upgrade go dependencies () 2023-07-14 11:00:31 +08:00
repository Second part of refactor db.Find () 2023-12-11 16:56:48 +08:00
secret
session Next round of db.DefaultContext refactor () 2023-09-16 14:39:12 +00:00
setting [GITEA] add GetFile to config provider 2023-12-11 14:48:36 +01:00
sitemap
ssh Remove SSH workaround () 2023-11-03 15:21:05 +00:00
storage [CI] Forgejo Actions based CI for PR & branches 2023-12-11 13:55:27 +01:00
structs [FEAT] allow setting the update date on issues and comments 2023-12-11 14:48:36 +01:00
svg Refactor backend SVG package and add tests () 2023-08-05 04:34:59 +00:00
sync
system Replace more db.DefaultContext () 2023-10-15 17:46:06 +02:00
templates Render PyPi long description as document () 2023-12-05 15:02:01 +00:00
test Move web/api context related testing function into a separate package () 2023-09-01 11:26:07 +00:00
testlogger Replace interface{} with any () 2023-07-04 18:36:08 +00:00
timeutil
translation Replace interface{} with any () 2023-07-04 18:36:08 +00:00
turnstile
typesniffer Detect ogg mime-type as audio or video () 2023-08-15 10:31:25 +08:00
updatechecker Replace more db.DefaultContext () 2023-10-15 17:46:06 +02:00
upload
uri
user
util [LINT] Add deadcode linter 2023-12-11 14:48:36 +01:00
validation Check blocklist for emails when adding them to account () 2023-08-30 10:46:49 -05:00
web Make CORS work for oauth2 handlers () 2023-11-23 21:19:26 +08:00
webhook