No description
  • Go 50.1%
  • CSS 26.9%
  • HTML 22.4%
  • Dockerfile 0.6%
Find a file
Pierre-Olivier Mercier 57775bbf89 fix(security): redesign password reset tokens using crypto/rand with server-side storage
- Replace SHA512-based deterministic token with 32-byte crypto/rand token
- Store tokens server-side with 1-hour expiry and single-use semantics
- Remove genToken (previously broken due to time.Add immutability bug)
- Add CSRF double-submit cookie protection to change/lost/reset forms
- Remove token from form action URL (use hidden fields only, POST body)
- Add MailFrom field and SMTP_FROM env var for configurable sender address
- Add SMTP_PASSWORD_FILE env var for secure SMTP password loading
- Add PUBLIC_URL env var and --public-url flag for configurable reset link domain
- Use generic error messages in handlers to avoid information disclosure

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 15:30:48 +07:00
static fix(security): redesign password reset tokens using crypto/rand with server-side storage 2026-03-06 15:30:48 +07:00
.drone.yml Replace bindata by embed 2024-05-31 15:52:25 +02:00
.gitignore chldapasswd is now a go module 2021-02-03 15:16:19 +01:00
addy.go Can delete own aliases 2026-03-06 15:30:48 +07:00
change.go fix(security): redesign password reset tokens using crypto/rand with server-side storage 2026-03-06 15:30:48 +07:00
csrf.go fix(security): redesign password reset tokens using crypto/rand with server-side storage 2026-03-06 15:30:48 +07:00
Dockerfile Replace bindata by embed 2024-05-31 15:52:25 +02:00
go.mod chore(deps): update dependency go to v1.26.0 2026-03-06 15:30:48 +07:00
go.sum chore(deps): update module github.com/go-ldap/ldap/v3 to v3.4.12 2026-03-06 15:30:48 +07:00
ldap.go fix(security): redesign password reset tokens using crypto/rand with server-side storage 2026-03-06 15:30:48 +07:00
login.go Hide krbPrincipalKey 2026-03-06 15:30:48 +07:00
lost.go fix(security): redesign password reset tokens using crypto/rand with server-side storage 2026-03-06 15:30:48 +07:00
main.go fix(security): redesign password reset tokens using crypto/rand with server-side storage 2026-03-06 15:30:48 +07:00
renovate.json Add renovate.json 2021-08-03 09:02:00 +00:00
reset.go fix(security): redesign password reset tokens using crypto/rand with server-side storage 2026-03-06 15:30:48 +07:00
static.go Replace bindata by embed 2024-05-31 15:52:25 +02:00