diff options
| author | Dennis Fink | 2026-10-31 16:42:44 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-10-31 16:42:44 +0100 |
| commit | 3494eab1208dc18478485e02c61e292556502fa6 (patch) | |
| tree | 5d9e95d709b119a0245d0294837f9b6a7e38bff1 /contrib | |
| parent | fdb1762715658eae987dd104a0e6d3cb92a4a8d7 (diff) | |
| download | webmentions-ssg-3494eab1208dc18478485e02c61e292556502fa6.tar.gz webmentions-ssg-3494eab1208dc18478485e02c61e292556502fa6.zip | |
fix(core): harden session and credential security
Require persistent non-placeholder signing keys outside local
development and bind login sessions to the current password hash so
password changes revoke existing cookies.
Enforce a minimal password policy for user administration while
preserving long Unicode passphrases without arbitrary composition
limits.
Diffstat (limited to 'contrib')
| -rw-r--r-- | contrib/webmentions-ssg.example.cfg | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/webmentions-ssg.example.cfg b/contrib/webmentions-ssg.example.cfg index 22fcf72..2b7b115 100644 --- a/contrib/webmentions-ssg.example.cfg +++ b/contrib/webmentions-ssg.example.cfg @@ -20,6 +20,10 @@ BOOTSTRAP_SERVE_LOCAL = True # Generate a persistent random key, e.g.: # python -c 'import secrets; print(secrets.token_urlsafe(32))' # Never commit your real key or SMTP password to version control. +# Production refuses to start without a real, persistent key (>=32 random bytes); +# set the same SECRET_KEY in the web process and every worker. +# Changing this key invalidates all existing signed login sessions. +# Upgrading to password-bound sessions also requires users to sign in again once. SECRET_KEY = "REPLACE_WITH_A_LONG_RANDOM_SECRET" # --------------------------------------------------------------------------- |
