Go to file
Reedy a2fc069174 Use an accurate number of captchas
Change-Id: Ice434235687aa68ccf37a0219d379beb97e5a8ec
2017-02-08 18:05:49 +00:00
FancyCaptcha Use an accurate number of captchas 2017-02-08 18:05:49 +00:00
i18n Localisation updates from https://translatewiki.net. 2017-02-07 22:41:02 +01:00
includes Rename 'type' field of authevents channel to 'eventType' 2016-11-26 01:12:58 +00:00
maintenance Use an accurate number of captchas 2017-02-08 18:05:49 +00:00
MathCaptcha Remove getForm() and replace by getFormInformation() 2016-08-04 01:45:13 +00:00
QuestyCaptcha Localisation updates from https://translatewiki.net. 2016-11-20 22:13:52 +01:00
ReCaptcha Localisation updates from https://translatewiki.net. 2017-01-06 23:07:51 +01:00
ReCaptchaNoCaptcha Localisation updates from https://translatewiki.net. 2017-01-01 09:53:40 +01:00
resources Replace jshint/jscs with eslint and add stylelint 2017-01-18 16:53:09 -08:00
SimpleCaptcha Simplify function Captcha::loadText for readability 2017-02-08 01:50:34 +00:00
tests/phpunit Set valid $wgRateLimits in tests 2016-10-03 23:36:43 -06:00
.eslintrc.json Replace jshint/jscs with eslint and add stylelint 2017-01-18 16:53:09 -08:00
.gitignore Add AUTHORS file and update authors for Special:Version 2015-12-06 14:21:07 +01:00
.gitreview Whoops, track not trace 2016-10-24 17:02:20 -07:00
.mailmap Update AUTHORS.txt 2016-08-17 23:08:41 +02:00
.stylelintrc Replace jshint/jscs with eslint and add stylelint 2017-01-18 16:53:09 -08:00
AUTHORS.txt Update AUTHORS.txt 2016-08-17 23:08:41 +02:00
blacklist Just saw "wench" in a captcha 2016-10-06 15:04:48 -07:00
captcha-old.py Re-add old version of captcha.py without Tim's OCR improvements 2016-11-04 18:49:19 +00:00
captcha.py Add a gradient to FancyCaptcha 2014-09-26 10:41:26 +10:00
composer.json build: Updating mediawiki/mediawiki-codesniffer to 0.7.2 2016-05-27 18:18:59 -07:00
ConfirmEdit.alias.php Localisation updates from https://translatewiki.net. 2015-06-14 21:04:12 +02:00
ConfirmEdit.php Fix file permissions 2016-06-09 16:19:58 -07:00
COPYING Add COPYING 2014-02-08 01:51:17 +00:00
extension.json Use an accurate number of captchas 2017-02-08 18:05:49 +00:00
FancyCaptcha.php Move FancyCaptcha to its own location 2015-05-21 16:19:38 +00:00
Gruntfile.js Revert "build: Re-use MessageDirs in banana conf" 2017-01-28 18:08:39 +00:00
MathCaptcha.php Move MathCaptcha to it's own place 2015-05-21 19:02:34 +02:00
package.json Replace jshint/jscs with eslint and add stylelint 2017-01-18 16:53:09 -08:00
phpcs.xml Add php code sniffer 2015-10-28 21:46:29 +00:00
QuestyCaptcha.php Move QuestyCaptcha to its own place 2015-05-23 07:49:47 +00:00
README.md Mark ReCaptcha as deprecated 2016-11-18 19:38:39 +01:00
ReCaptcha.php Move ReCaptcha to it's own place 2015-05-21 19:08:12 +02:00
ReCaptchaNoCaptcha.php Implement support for Google reCAPTCHA 2.0 ("No captcha") 2015-06-27 03:00:11 +02:00

ConfirmEdit

ConfirmEdit extension for MediaWiki

This extension provides various CAPTCHA tools for MediaWiki, to allow for protection against spambots and other automated tools.

For more information, see the extension homepage at: http://www.mediawiki.org/wiki/Extension:ConfirmEdit

Overview

The following modules are included in ConfirmEdit:

  • SimpleCaptcha - users have to solve an arithmetic math problem
  • MathCaptcha - users have to solve a math problem that's displayed as an image
  • FancyCaptcha - users have to identify a series of characters, displayed in a stylized way
  • QuestyCaptcha - users have to answer a question, out of a series of questions defined by the administrator(s)
  • ReCaptcha - users have to identify a series of characters, either visually or audially, from a widget provided by the reCAPTCHA service. This plugin is depreacted since MediaWiki 1.28! Please switch to the new ReCaptchaNoCaptcha version of ReCaptcha (which is supported by Google and ConfirmEdit).
  • ReCaptchaNoCaptcha - users have to solve different types of visually or audially tasks.

License

ConfirmEdit is published under the GPL license.

Authors

The main framework, and the SimpleCaptcha and FancyCaptcha modules, were written by Brion Vibber.

The MathCaptcha module was written by Rob Church.

The QuestyCaptcha module was written by Benjamin Lees.

The reCAPTCHA module was written by Mike Crawford and Ben Maurer.

Additional maintenance work was done by Yaron Koren.

Configuations Comments

/**
 * List of IP ranges to allow to skip the captcha, similar to the group setting:
 * "$wgGroupPermission[...]['skipcaptcha'] = true"
 *
 * Specific IP addresses or CIDR-style ranges may be used,
 * for instance:
 * $wgCaptchaWhitelistIP = array('192.168.1.0/24', '10.1.0.0/16');
 */
$wgCaptchaWhitelistIP = false;

/**
 * Actions which can trigger a captcha
 *
 * If the 'edit' trigger is on, *every* edit will trigger the captcha.
 * This may be useful for protecting against vandalbot attacks.
 *
 * If using the default 'addurl' trigger, the captcha will trigger on
 * edits that include URLs that aren't in the current version of the page.
 * This should catch automated linkspammers without annoying people when
 * they make more typical edits.
 *
 * The captcha code should not use $wgCaptchaTriggers, but CaptchaTriggers()
 * which also takes into account per namespace triggering.
 */
$wgCaptchaTriggers = array();
$wgCaptchaTriggers['edit']          = false; // Would check on every edit
$wgCaptchaTriggers['create']        = false; // Check on page creation.
$wgCaptchaTriggers['sendemail']     = false; // Special:Emailuser
$wgCaptchaTriggers['addurl']        = true;  // Check on edits that add URLs
$wgCaptchaTriggers['createaccount'] = true;  // Special:Userlogin&type=signup
$wgCaptchaTriggers['badlogin']      = true;  // Special:Userlogin after failure

/**
 * You may wish to apply special rules for captcha triggering on some namespaces.
 * $wgCaptchaTriggersOnNamespace[<namespace id>][<trigger>] forces an always on /
 * always off configuration with that trigger for the given namespace.
 * Leave unset to use the global options ($wgCaptchaTriggers).
 *
 * Shall not be used with 'createaccount' (it is not checked).
 */
$wgCaptchaTriggersOnNamespace = array();

# Example:
# $wgCaptchaTriggersOnNamespace[NS_TALK]['create'] = false; //Allow creation of talk pages without captchas.
# $wgCaptchaTriggersOnNamespace[NS_PROJECT]['edit'] = true; //Show captcha whenever editing Project pages.

/**
 * Indicate how to store per-session data required to match up the
 * internal captcha data with the editor.
 *
 * 'CaptchaSessionStore' uses PHP's session storage, which is cookie-based
 * and may fail for anons with cookies disabled.
 *
 * 'CaptchaCacheStore' uses $wgMemc, which avoids the cookie dependency
 * but may be fragile depending on cache configuration.
 */
$wgCaptchaStorageClass = 'CaptchaSessionStore';

/**
 * Number of seconds a captcha session should last in the data cache
 * before expiring when managing through CaptchaCacheStore class.
 *
 * Default is a half hour.
 */
$wgCaptchaSessionExpiration = 30 * 60;

/**
 * Number of seconds after a bad login that a captcha will be shown to
 * that client on the login form to slow down password-guessing bots.
 *
 * Has no effect if 'badlogin' is disabled in $wgCaptchaTriggers or
 * if there is not a caching engine enabled.
 *
 * Default is five minutes.
 */
$wgCaptchaBadLoginExpiration = 5 * 60;

/**
 * Allow users who have confirmed their email addresses to post
 * URL links without being harassed by the captcha.
 */
$ceAllowConfirmedEmail = false;

/**
 * Number of bad login attempts before triggering the captcha.  0 means the
 * captcha is presented on the first login.
 */
$wgCaptchaBadLoginAttempts = 3;

/**
 * Regex to whitelist URLs to known-good sites...
 * For instance:
 * $wgCaptchaWhitelist = '#^https?://([a-z0-9-]+\\.)?(wikimedia|wikipedia)\.org/#i';
 * Local admins can define a whitelist under [[MediaWiki:captcha-addurl-whitelist]]
 */
$wgCaptchaWhitelist = false;

/**
 * Additional regexes to check for. Use full regexes; can match things
 * other than URLs such as junk edits.
 *
 * If the new version matches one and the old version doesn't,
 * toss up the captcha screen.
 *
 * @fixme Add a message for local admins to add items as well.
 */
$wgCaptchaRegexes = array();