From 3494eab1208dc18478485e02c61e292556502fa6 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Sat, 31 Oct 2026 16:42:44 +0100 Subject: 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. --- contrib/webmentions-ssg.example.cfg | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'contrib') 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" # --------------------------------------------------------------------------- -- cgit v1.3.1