Skip to content

Instantly share code, notes, and snippets.

@ciencia
Created February 23, 2025 17:09
Show Gist options
  • Save ciencia/8c776d095f36f7267072d8d09640020c to your computer and use it in GitHub Desktop.
Save ciencia/8c776d095f36f7267072d8d09640020c to your computer and use it in GitHub Desktop.
MediaWiki extension ConfirmEdit log captcha challenge information (REL1_43)
diff --git a/SimpleCaptcha/SimpleCaptcha.php b/SimpleCaptcha/SimpleCaptcha.php
index 10d42088..610a6bac 100644
--- a/SimpleCaptcha/SimpleCaptcha.php
+++ b/SimpleCaptcha/SimpleCaptcha.php
@@ -1072,13 +1072,13 @@ class SimpleCaptcha {
$info = $this->retrieveCaptcha( $index );
if ( $info ) {
if ( $this->keyMatch( $word, $info ) ) {
- $this->log( "passed" );
+ $this->log( "Captcha $index passed with word $word ({$info['question']})" );
$this->clearCaptcha( $index );
$this->setCaptchaSolved( true );
return true;
} else {
$this->clearCaptcha( $index );
- $this->log( "bad form input" );
+ $this->log( "Captcha $index failed: bad form input $word ({$info['question']})" );
$this->setCaptchaSolved( false );
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment