aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/config.py
diff options
context:
space:
mode:
authorDennis Fink2026-10-30 08:11:05 +0100
committerDennis Fink2026-10-30 08:11:05 +0100
commit9f093cf07a3531ee4b7d02c20151e21c141a93de (patch)
treedc39b1586dd6599bd09e95f3dd463a0f64c2de3f /webmentions_ssg/config.py
parentedd7c0c2220ba12c2a773f9ba1cf6e0e7a273856 (diff)
downloadwebmentions-ssg-9f093cf07a3531ee4b7d02c20151e21c141a93de.tar.gz
webmentions-ssg-9f093cf07a3531ee4b7d02c20151e21c141a93de.zip
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.
Diffstat (limited to '')
-rw-r--r--webmentions_ssg/config.py2
1 files changed, 2 insertions, 0 deletions
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