From 9f093cf07a3531ee4b7d02c20151e21c141a93de Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Fri, 30 Oct 2026 08:11:05 +0100 Subject: fix(core): harden authentication flows Reduce login abuse and username enumeration by rate limiting POST attempts and always performing password verification, even for unknown users. Require authenticated, CSRF-protected POST requests for logout so sessions cannot be terminated through cross-site or accidental GET requests. --- webmentions_ssg/config.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'webmentions_ssg/config.py') diff --git a/webmentions_ssg/config.py b/webmentions_ssg/config.py index 010e393..2661704 100644 --- a/webmentions_ssg/config.py +++ b/webmentions_ssg/config.py @@ -43,6 +43,8 @@ class DefaultConfig: ENDPOINT_GLOBAL_RATE_LIMIT = "1000/hour" ENDPOINT_REVERIFY_COOLDOWN_SECONDS = 600 + LOGIN_RATE_LIMIT = "5/minute;30/hour" + class DevelopmentConfig(DefaultConfig): DEBUG = True -- cgit v1.3.1