[OpenStack-Infra] Wiki.o.o sustaining spam attack

Elizabeth K. Joseph lyz at princessleia.com
Wed Feb 24 20:23:58 UTC 2016


On Mon, Feb 22, 2016 at 11:34 PM, JP Maxwell <jp at tipit.net> wrote:
> OK - so per the info here, you have to set the type of Captcha and add in
> editing and create page as triggers requiring Captcha.
>
> As an example to use QuestyCaptcha a the bottom of the LocalSettings.php
> file:
>
> https://www.mediawiki.org/wiki/Extension:ConfirmEdit#QuestyCaptcha
>
> And make sure the triggers are set:
>
> https://www.mediawiki.org/wiki/Extension:ConfirmEdit#Configuration
>
> So, for example (you might want to change the questions), but the below
> should at least stop the bleeding?
>
> require_once "$IP/extensions/ConfirmEdit/ConfirmEdit.php";
>
> // Use this line ONLY if your MediaWiki version is 1.25 or newer:
> //wfLoadExtension( 'ConfirmEdit/QuestyCaptcha' );
> // Use this line ONLY if your MediaWiki version is older than 1.25:
> require_once "$IP/extensions/ConfirmEdit/QuestyCaptcha.php";
>
> $wgCaptchaClass = 'QuestyCaptcha';
>
> // Add your questions in LocalSettings.php using this format
> $wgCaptchaQuestions[] = array( 'question' => "A question?", 'answer' => "An
> Answer");
> $wgCaptchaQuestions[] = array( 'question' => 'How much wood would a
> woodchuck chuck if a woodchuck could chuck wood?', 'answer' => 'as much wood
> as...' );
> $wgCaptchaQuestions[] = array( 'question' => "What is this wiki's name?",
> 'answer' => "$wgSitename" );
> // You can also provide several acceptable answers to a given question (the
> answers shall be in lowercase):
> $wgCaptchaQuestions[] = array( 'question' => "2 + 2 ?", 'answer' => array(
> '4', 'four' ) );
>
> $wgCaptchaTriggers['edit']          = true;
> $wgCaptchaTriggers['create']        = true;


We're now storing our Settings.php (LocalSettings.php points at it) in
git and people can submit patches against it in the puppet-mediawiki
module:

https://git.openstack.org/cgit/openstack-infra/puppet-mediawiki/tree/templates/Settings.php.erb

A quick glance looks like we're already loading QuestyCaptcha, but it
seems to not be enabled/used?

-- 
Elizabeth Krumbach Joseph || Lyz || pleia2



More information about the OpenStack-Infra mailing list