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
This commit is contained in:
Tom Fifield 2016-11-20 10:09:27 +08:00 committed by Jeremy Stanley
parent d7dc1746d6
commit dca11a634c

View File

@ -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;