fix: security & privacy (rate limiter fix, csrf session cookie, logout on server, drafts stale token passw, login timing, password over 72b, JWT_SECRET complexity, SMTP TLS, CSV export neutralised, fonts bundled, upload metadata, hourly cleanup job, privacy.md report)

This commit is contained in:
Florian Sylvain committed 2026-10-22 00:49:19 +02:00
1 parent e2812ee0b9
commit ea98c5ec05
118 files changed
+3828 -130

No files matched your search

+6 -4
View File
@@ -53,12 +53,14 @@ Feature: Password and code hashing go through a domain Hasher interface
Then the result is the error user.ErrInvalidCredentials
And errors.Is(err, user.ErrInvalidCredentials) is true
Scenario: Authenticating an unknown username never calls the hasher
Scenario: Authenticating an unknown username spends the same hashing work as a wrong password
Given a user repository with no user "bob"
When AuthenticateUserUseCase.Authenticate is called with username "bob" and password
When AuthenticateUserUseCase.Authenticate is called twice with username "bob" and password
"hunter2example"
Then the result is the error user.ErrUserNotFound
And the hasher's Compare is never called
Then each result is the error user.ErrUserNotFound
And the hasher's Compare is called once per attempt, against a decoy hash of a random value
that no password can match, so response time does not reveal whether a username exists
And the decoy is hashed once and reused for every later unknown username
Scenario Outline: Login over HTTP still can't distinguish a bad password from an unknown username
Given a user repository containing a user "alice" with stored password "hashed:hunter2example"