Skip to content

Instantly share code, notes, and snippets.

@aaronpk
Created June 2, 2013 16:58
Show Gist options
  • Save aaronpk/5694138 to your computer and use it in GitHub Desktop.
Save aaronpk/5694138 to your computer and use it in GitHub Desktop.
Preventing MediaWiki spam
// Garbee suggests the following settings in LocalSettings.php to help prevent bot spam:
// Number of edits an account requires before it is autoconfirmed
// http://www.mediawiki.org/wiki/Manual:$wgAutoConfirmCount
$wgAutoConfirmCount = 1;
// Number of seconds an account is required to age before it's given the implicit 'autoconfirmed' group membership.
// Note that the user must pass $wgAutoConfirmAge and $wgAutoConfirmCount to become a member of that group.
// http://www.mediawiki.org/wiki/Manual:$wgAutoConfirmAge
$wgAutoConfirmAge = 86400; // one day
// Only allow autoconfirmed users to create new pages
$wgGroupPermissions['*']['createpage'] = false;
$wgGroupPermissions['user']['createpage'] = false;
$wgGroupPermissions['autoconfirmed' ]['createpage'] = true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment