From dca11a634cad01da5aee73cd20fbb46593535b72 Mon Sep 17 00:00:00 2001 From: Tom Fifield Date: Sun, 20 Nov 2016 10:09:27 +0800 Subject: [PATCH] Add a conservative page creation rate limit This patch limits users who are not in the known-good users list ('autopatrol') to creating 5 pages per day. The vast majority of our spam comes from the creation of new pages. This patch will limit the usefulness of each spammer account, by limiting the number of pages each can create. By setting the number at 5 initially, it is not expected to have an impact on legitimate new users playing with the wiki for the first time. Neither will it have an impact for many spam accounts, but at least it provides and upper limit for cleanup. Relevant references: * Rate limts https://www.mediawiki.org/wiki/Manual:$wgRateLimits * User rights https://www.mediawiki.org/wiki/Manual:User_rights Change-Id: Iabe785fedb121a32d8adac5a490d9b5b9f40219f --- templates/Settings.php.erb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/Settings.php.erb b/templates/Settings.php.erb index c494aa1..1b58497 100644 --- a/templates/Settings.php.erb +++ b/templates/Settings.php.erb @@ -177,6 +177,9 @@ $wgGroupPermissions['user']['writeapi'] = false; $wgGroupPermissions['autopatrol']['writeapi'] = true; +# rate limit page creation by non-verified users to 5 per day +$wgRateLimits['createpage']['user'] = array(5, 86400); + # Useful for debugging purposes, and doesn't expose very sensitive info $wgShowExceptionDetails = true;