Topic on Project:Support desk

Captcha Fails, spam suceeds

6
Star Warden (talkcontribs)

Hi. Our captcha trigger seems to be malfunctioning since this morning and there have already appeared some spammy accounts. I am getting these errors while on the login page (http://dragon-mania-legends-wiki.mobga.me/Special:UserLogin): Notice: Undefined index: badlogin /srv/dml-wiki/extensions/ConfirmEdit/SimpleCaptcha/Captcha.php on line 348 Notice: Undefined index: badloginperuser in /srv/dml-wiki/extensions/ConfirmEdit/SimpleCaptcha/Captcha.php on line 365

and on the create account page (http://dragon-mania-legends-wiki.mobga.me/Special:CreateAccount): Notice: Undefined index: createaccount in /srv/dml-wiki/extensions/ConfirmEdit/SimpleCaptcha/Captcha.php on line 924

I don't understand why it does that since we're using QuestyCaptcha and not SimpleCaptcha. Deleting the folder brings the wiki down. I tried disabling SimpleCaptcha in /ConfirmEdit/extension.json under AutoloadClasses (line 51), but no luck.

We're using the REL1_27 version of ConfirmEdit. I disabled create accounts, for now, so the error on the createaccount page cannot be seen, but the ones on the login page can be seen. The console doesn't display any related java errors, so I am not sure what's causing it....

Star Warden (talkcontribs)

Update: the exact same issue happens on the wiki, used for testing purposes, installed on my PC (through xampp).

Star Warden (talkcontribs)

While I was waiting/trying to find a solution for this issue, I tried using ConfirmAccount to, at least, permit the creation of user accounts, but in a controlled manner. Apparently, there's an issue with this extension, as well. On the 'request account' page (http://dragon-mania-legends-wiki.mobga.me/Special:RequestAccount), I am getting this issue Notice: Undefined index: createaccount in /srv/dml-wiki/extensions/ConfirmAccount/frontend/specialpages/actions/RequestAccount_body.php on line 245

As I wrote above, the 'createaccount' index seems to be undefined in the issue related to ConfirmEdit. And even if I add a user name and email and hit 'request account', I get this: "Error sending mail: Unknown error in PHP's mail() function." Why? I used php update.php to create the necessary tables and what I added in LocalSettings was:

require_once "$IP/extensions/ConfirmAccount/ConfirmAccount.php";
 $wgMakeUserPageFromBio = false;
 $wgAutoWelcomeNewUsers = false;
 $wgConfirmAccountRequestFormItems = array(
  'UserName' => array( 'enabled' => true ),
  'RealName' => array( 'enabled' => false ),
  'Biography' => array( 'enabled' => false, 'minWords' => 50 ),
  'AreasOfInterest' => array( 'enabled' => false ),
  'CV' => array( 'enabled' => false ),
  'Notes' => array( 'enabled' => false ),
  'Links' => array( 'enabled' => false ),
  'TermsOfService' => array( 'enabled' => false )
 );

How do I define those indexes?

Star Warden (talkcontribs)

Okay, now that's very strange. The issue fixed itself after I moved the entire code at the bottom of localsettings.php... But why? Why was the position important?

Star Warden (talkcontribs)

Okay, for anyone who's interested, I ran some tests and I found the culprit. The issue occured when the Captcha code was placed before the call for Wikiforum: wfLoadExtension( 'WikiForum' );.

Initially, I thought it was because of this value $wgCaptchaTriggers['wikiforum'] = true;, but disabling it or placing it after the call, even if the captcha call was before the wikiforum call, still caused the same undefined indexes issue. Then I navigated to the forum and tried opening a thread and I got this error: Fatal error: Call to undefined method QuestyCaptcha::getFormInformation() in /srv/dml-wiki/extensions/WikiForum/WikiForumClass.php on line 359

Line 359 in that .php file is $formInformation = $captcha->getFormInformation();

Someone else pointed out this issue, on another thread of mine, where I showed some extracts from the server error log: https://www.mediawiki.org/wiki/Topic:Teez4ebplhy9kxo1

If I disable $wgCaptchaTriggers['wikiforum'] = true;, then the forum is working again, but it won't be able to prevent spammy comments since it won't run captchas. Is there any way around it or it's an unsolvable issue since the author doesn't maintain the REL branches? It can prevent spam from anonymous by setting $wgWikiForumAllowAnonymous to false, but then anonymous aren't able to comment.

Star Warden (talkcontribs)

Update: The part about the position is my fault, as I completely forgot the instructions here. I tidied up localsettings a bit the other day and I wasn't aware the position was important. Still, even if $wgCaptchaTriggers['wikiforum'] = true; is set below the call for ConfirmEdit, I will still get the fatal error from my previous reply. It seems that by setting $wgWikiForumAllowAnonymous to false, the error won't show up anymore for those who aren't forced to enter the captcha, but then the captchatrigger is pretty useless since my intention is to allow anonymous to comment, but to prevent spammers. Plus, the error will still show up for non-autoconfirmed users (but it won't show up for those who aren't forced to go through the captcha).

Reply to "Captcha Fails, spam suceeds"