Preventing spam on MediaWiki: Difference between revisions

From ULYSSIS documentation
No edit summary
No edit summary
Line 1: Line 1:
==Google's recaptcha==
== About ReCaptcha ==
===What is recaptcha and how/will it help prevent spam ?===
Google introduced a new generation of ReCaptcha, called NoCaptcha in 2014. Using the MediaWiki extension ConfirmEdit, NoCaptcha can be used to prevent spam on wikis. ConfirmEdit is bundled with MediaWiki by default, but to enable NoCaptcha, you will have to get an API key from Google.
For answers to those questions you can look at google's page about recaptcha( https://google.com/recaptcha)


===Installation===
== Installation ==
This installation guide requires mediawiki '''1.26''' or higher
The NoCaptcha ConfirmEdit extension requires MediaWiki 1.26 or higher.


* Go to google's recaptcha administrator page(https://www.google.com/recaptcha/admin) and register your site
First, you have to get an API key from Google. Go to Google's ReCaptcha administrator page https://www.google.com/recaptcha/admin and register your website. You will need to select '''reCAPTCHA v2''', and '''"I'm not a robot" Checkbox'''. After registering your website, you will be presented with a public '''site key''' and a private '''secret key'''.
* Open your *LocalSettings.php* file which is in your mediawiki instalation folder
* Put the following piece of text in the above mentioned file
<code>
require_once "$IP/extensions/ConfirmEdit/ConfirmEdit.php";


wfLoadExtension( 'ConfirmEdit/ReCaptchaNoCaptcha' );
Now you have to install and configure the ConfirmEdit extension. Locate the <code>LocalSettings.php</code> file in your MediaWiki installation folder and add the following lines to it:
$wgCaptchaClass = 'ReCaptchaNoCaptcha';
$wgReCaptchaSiteKey = ' '''your public/site key here''' ';
$wgReCaptchaSecretKey = ' '''your private key here''' ';
</code>
example of public and private key (https://i.imgur.com/vGJKEXx.png)


* mediawiki wil start loading recaptcha in the background and once done wil start using recaptcha for defending you from bots
wfLoadExtensions([ 'ConfirmEdit', 'ConfirmEdit/ReCaptchaNoCaptcha' ]);
$wgCaptchaClass = 'ReCaptchaNoCaptcha';
$wgReCaptchaSiteKey = 'your public/site key here';
$wgReCaptchaSecretKey = 'your private/secret key here';
 
More information about the configuration options for advanced usage can be found here: https://www.mediawiki.org/wiki/Extension:ConfirmEdit#Configuration


[[Category:Security & anti-spam]]
[[Category:Security & anti-spam]]

Revision as of 21:05, 28 August 2019

About ReCaptcha

Google introduced a new generation of ReCaptcha, called NoCaptcha in 2014. Using the MediaWiki extension ConfirmEdit, NoCaptcha can be used to prevent spam on wikis. ConfirmEdit is bundled with MediaWiki by default, but to enable NoCaptcha, you will have to get an API key from Google.

Installation

The NoCaptcha ConfirmEdit extension requires MediaWiki 1.26 or higher.

First, you have to get an API key from Google. Go to Google's ReCaptcha administrator page https://www.google.com/recaptcha/admin and register your website. You will need to select reCAPTCHA v2, and "I'm not a robot" Checkbox. After registering your website, you will be presented with a public site key and a private secret key.

Now you have to install and configure the ConfirmEdit extension. Locate the LocalSettings.php file in your MediaWiki installation folder and add the following lines to it:

wfLoadExtensions([ 'ConfirmEdit', 'ConfirmEdit/ReCaptchaNoCaptcha' ]);
$wgCaptchaClass = 'ReCaptchaNoCaptcha';
$wgReCaptchaSiteKey = 'your public/site key here';
$wgReCaptchaSecretKey = 'your private/secret key here';

More information about the configuration options for advanced usage can be found here: https://www.mediawiki.org/wiki/Extension:ConfirmEdit#Configuration