Jump to content

Extension talk:ConfirmEdit

Add topic
From mediawiki.org

LLMs solving Questy?

[edit]

Hej! I didn't have any problems with spam registrations for years. Only recently spam registrations are flooding my two wiki projects. I used Questy with two wiki specific questions. I tested the questions with mistral.ai and it can solve these questions...

Does anybody have a good solution? I really don't want to confirm registrations - that is stealing my life time...

Kaffeeringe (talk) 13:55, 20 January 2025 (UTC)Reply

Same happened in my wiki in the last few days, unfortunately. The Extension Manual as been updated with this suggestion using dynamic Questions: https://www.thingelstad.com/2013/07/09/stopping-mediawiki-spam.html
I haven't tried this yet, maybe this helps? UsualyWeJustSayPlease (talk) 19:03, 28 January 2025 (UTC)Reply
The syntax used by Jamie Thingelstad is no longer correct.
This one is:
-----------------------------------------------------------------
wfLoadExtensions([ 'ConfirmEdit', 'ConfirmEdit/QuestyCaptcha' ]);
$wgAutoConfirmAge = 600;
$wgAutoConfirmCount = 10;
$myChallengeString = substr(md5(uniqid(mt_rand(), true)), 0, 8);
$myChallengeIndex = rand(0, 7) + 1;
$myChallengePositions = array('first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh', 'eighth');
$myChallengePositionName = $myChallengePositions[$myChallengeIndex - 1];
$dynamicQuestion = "Please provide the $myChallengePositionName character from the sequence $myChallengeString:";
$dynamicAnswer = $myChallengeString[$myChallengeIndex - 1];
$wgCaptchaQuestions = [
'What day of the week is it at <a href="http://google.com/search?q=gmt+time">Greenwich Mean Time</a> (GMT) right now?' =>
gmdate("l"),
'In 24-hour format, what hour is it in <a href="http://google.com/search?q=gmt+time">Greenwich Mean Time</a> (GMT) right now?>
gmdate("G"),
$dynamicQuestion => $dynamicAnswer
];
$wgGroupPermissions['emailconfirmed']['skipcaptcha'] = true;
$wgAllowConfirmedEmail = true;
-----------------------------------------------------------------
Silkwood (talk) 09:41, 10 April 2025 (UTC)Reply
This one throws an error for me unless I remove the hour question. So this works/displays the string:
$wgCaptchaQuestions = [
'What day of the week is it at <a href="https://google.com/search?q=gmt+time">Greenwich Mean Time</a> (GMT) right now?' => gmdate("l"),
$dynamicQuestion => $dynamicAnswer];
Also, my PHP doesn't like
substr(md5(uniqid(mt_rand(), true)), 0, 8);
this generates something like this on the signup page:
"Please provide the eighth character from the sequence 057dbac9:"
instead of echoing the sequence. UsualyWeJustSayPlease (talk) 20:15, 25 September 2025 (UTC)Reply
I really liked this approach. However, this method was cracked long before the inception of LLMs, about seven or eight years ago. -- [[kgh]] (talk) 07:43, 26 September 2025 (UTC)Reply

Captcha for read access?

[edit]

Hi, I know that ConfirmEdit, as the name suggests, is primarily concerned with editing, not read access, but what if you want Captcha, as I do, to put up a soft barrier against excessive bot activity and its negative impact on CPU and concurrent entry processes? They would still visit the site and sure, many would be able to crack challenges, but it would still save you a lot of much needed bandwidth. In my experience, scrapers, bots looking for vulnerabilities and what not have really become a plague these last few years, to the point that your .htaccess and robots.txt settings are not enough to offer the appropriate amount of protection.

If it is not the right job for ConfirmEdit (I suppose not), are there any extensions available that can do it and that maybe hook into ConfirmEdit? Rand(1,2022) (talk) 09:35, 25 February 2025 (UTC)Reply

Okay, I went ahead and created a rough version of such an extension myself. Rand(1,2022) (talk) 18:56, 2 March 2025 (UTC)Reply

Class "Turnstile" Not Found on Mediawiki 1.43.0

[edit]

Hello,

We recently updated (fresh-installed) our MediaWiki Installation to 1.43.0, but we're constantly encountering the following error:


&action=edit Error: Class "Turnstile" not found

Backtrace:

from /path/to/public_html/extensions/ConfirmEdit/includes/Hooks.php(78)

#0 /path/to/public_html/extensions/ConfirmEdit/includes/Hooks.php(148): MediaWiki\Extension\ConfirmEdit\Hooks::getInstance()

#1 /path/to/public_html/includes/HookContainer/HookContainer.php(159): MediaWiki\Extension\ConfirmEdit\Hooks->onEditPage__showEditForm_fields()

#2 /path/to/public_html/includes/HookContainer/HookRunner.php(1621): MediaWiki\HookContainer\HookContainer->run()

#3 /path/to/public_html/includes/editpage/EditPage.php(3067): MediaWiki\HookContainer\HookRunner->onEditPage__showEditForm_fields()

#4 /path/to/public_html/includes/editpage/EditPage.php(783): MediaWiki\EditPage\EditPage->showEditForm()

#5 /path/to/public_html/includes/actions/EditAction.php(66): MediaWiki\EditPage\EditPage->edit()

#6 /path/to/public_html/includes/actions/ActionEntryPoint.php(733): EditAction->show()

#7 /path/to/public_html/includes/actions/ActionEntryPoint.php(510): MediaWiki\Actions\ActionEntryPoint->performAction()

#8 /path/to/public_html/includes/actions/ActionEntryPoint.php(146): MediaWiki\Actions\ActionEntryPoint->performRequest()

#9 /path/to/public_html/includes/MediaWikiEntryPoint.php(200): MediaWiki\Actions\ActionEntryPoint->execute()

#10 /path/to/public_html/index.php(58): MediaWiki\MediaWikiEntryPoint->run()

#11 {main}


Is anyone getting a similar error?

Your help will be greatly appreciated! 173.198.71.102 01:10, 26 February 2025 (UTC)Reply

Our configuration is as is:
wfLoadExtensions( array( 'ConfirmEdit', 'ConfirmEdit/Turnstile' ) );
$wgCaptchaClass = 'Turnstile';
$wgTurnstileSiteKey='';
$wgTurnstileSecretKey= '';
However, we are still getting this error even when we enable ReCaptchaNoCaptcha or SimpleCaptcha. 173.198.71.102 01:12, 26 February 2025 (UTC)Reply
I was getting the exact same thing. It took me hours to figure out. The fix for me was really simple. Instead of:
$wgCaptchaClass = 'Turnstile';
I needed to fully qualify the class by including its namespace. Once I changed it to this, it started working:
$wgCaptchaClass = 'MediaWiki\\Extension\\ConfirmEdit\\Turnstile\\Turnstile';
Hopefully that works for you too! IdeaSupreme (talk) 20:43, 28 May 2025 (UTC)Reply
This is it, same problem, solved with
$wgCaptchaClass = 'MediaWiki\\Extension\\ConfirmEdit\\ReCaptchaNoCaptcha\\ReCaptchaNoCaptcha'; ~2025-147504 (talk) 15:36, 7 July 2025 (UTC)Reply

Error: Class "SimpleCaptcha" not found

[edit]

I upgraded my Wiki from version 1.39 to 1.43. The new Version is found on the Specialpages:Version and everythings seems OK. But I cannot edit and save a page. I always get the error message: "Error: Class "SimpleCaptcha" not found"

LocalSettings:

wfLoadExtension( 'ConfirmEdit' );

$wgCaptchaClass = 'SimpleCaptcha';

$wgCaptchaTriggers['contactpage'] = true;

$wgCaptchaTriggers['edit'] = false;

$wgCaptchaTriggers['create'] = false;

$wgCaptchaTriggers['sendemail'] = false;

$wgCaptchaTriggers['createaccount'] = false;

$wgGroupPermissions['*']['skipcaptcha'] = false;

$wgGroupPermissions['user']['skipcaptcha'] = true;

$wgGroupPermissions['sysop']['skipcaptcha'] = true;

$wgCaptchaTriggersOnNamespace[NS_TALK]['addurl'] = true;

$wgCaptchaTriggersOnNamespace[NS_TALK]['edit'] = true;

$wgReCaptchaSendRemoteIP = false; # sendet IP zu Google zwecks Analyse


I also tried (as used in my old Wiki version):

wfLoadExtensions([ 'ConfirmEdit', 'ConfirmEdit/ReCaptchaNoCaptcha' ]);

$wgCaptchaClass = 'ReCaptchaNoCaptcha'; #Ich bin kein Roboter

$wgReCaptchaSiteKey = ;

$wgReCaptchaSecretKey = ;

But I got always Error: Class "SimpleCaptcha" od "ReCaptchaNoCaptcha" not found.

Could somebody help with this problem? Thank you. Thomas TS (talk) 09:36, 20 June 2025 (UTC)Reply

solved with:
$wgCaptchaClass = 'MediaWiki\\Extension\\ConfirmEdit\\ReCaptchaNoCaptcha\\ReCaptchaNoCaptcha';
and maybe even SimpleCaptcha with
$wgCaptchaClass = 'MediaWiki\\Extension\\ConfirmEdit\\SimpleCaptcha\\SimpleCaptcha'; ~2025-147504 (talk) 15:38, 7 July 2025 (UTC)Reply

Comment

[edit]

Skipcaptcha user right does not bypass bad login ~2025-17980-9 (talk) 06:24, 12 July 2025 (UTC)Reply

Suggestion

[edit]

Suggest to add a captcha hierarchy

  1. Anons need to solve captcha for editing and adding links
  2. users can skip captcha when editing but must solve captcha to add links
  3. autoconfirmed can skip all captchas.

~2025-19053-8 (talk) 04:33, 14 July 2025 (UTC)Reply

1.43.4 Mediawiki Update broke "ConfirmAccount" due to "ConfirmEdit" changes

[edit]

After updating to 1.43.5 from 1.43.3 I get the following error:

Special:RequestAccount Error: Class "SimpleCaptcha" not found

from path/extensions/ConfirmAccount/includes/frontend/specialpages/actions/RequestAccount_body.php(258)

#0 path/extensions/ConfirmAccount/includes/frontend/specialpages/actions/RequestAccount_body.php(96): RequestAccountPage->showForm()

#1 path/includes/specialpage/SpecialPage.php(728): RequestAccountPage->execute()

#2 path/includes/specialpage/SpecialPageFactory.php(1717): MediaWiki\SpecialPage\SpecialPage->run()

#3 path/includes/actions/ActionEntryPoint.php(504): MediaWiki\SpecialPage\SpecialPageFactory->executePath()

#4 path/includes/actions/ActionEntryPoint.php(146): MediaWiki\Actions\ActionEntryPoint->performRequest()

#5 path/includes/MediaWikiEntryPoint.php(200): MediaWiki\Actions\ActionEntryPoint->execute()

#6 path/index.php(58): MediaWiki\MediaWikiEntryPoint->run()

#7 {main}

By downgrading ConfirmEdit to the 1.43.3 version ConfirmAccount works again. Tockdom46 (talk) 19:04, 13 October 2025 (UTC)Reply

You need to explicitly set $wgCaptchaClass = 'SimpleCaptcha'; which is a bit painful since we did not need to set this for a couple of release branches before. -- [[kgh]] (talk) 19:07, 13 October 2025 (UTC)Reply
Thank you for your fast reply, sadly adding this line to the LocalSettings.php does not fix the issue for me and the errors stay the same. Tockdom46 (talk) 19:41, 13 October 2025 (UTC)Reply
Hmm, explicitly defining the class is what fixed the issue for me with QuestyCaptcha. I figured the same should apply to SimpleCaptcha. Anyhow you could try $wgCaptchaClass = 'MediaWiki\\Extension\\ConfirmEdit\\SimpleCaptcha\\SimpleCaptcha';. If this does not help you need to report an issue on Phabricator. -- [[kgh]] (talk) 01:23, 14 October 2025 (UTC)Reply
You could also try to get master of ConfirmAccount. This may very well resolve the pain too, so I heard. -- [[kgh]] (talk) 08:45, 14 October 2025 (UTC)Reply