Captcha Mediawiki 1.5

From Fxp Wiki

Jump to: navigation, search

Mediawiki 1.5+ captcha hack

For mediawiki 1.3 see: Mediawiki Captcha 1.3

This code was rewritten by Chris at : SEDS'captha

in the EditPage.php

Declare the variable authImageCodein function importFormData
 
$this->authImageCode = $request->getText( 'code'  );
			$this->textbox1 = $this->safeUnicodeInput( $request, 
<php>
 
 
 
<div class="lgen" lang="en" xml:lang="en">I'm now inside the <i>Editform function</i></div>
 
<php>
		if ( 'save' == $formtype ) {
 
/* Modified FXP */
//$comment_code = $_POST['code'];  // AuthImage in mediawiki 1.3
 
// declared function importFormData
//as $this->authImageCode = $request->getText( 'code'  );
$comment_code = $this->authImageCode;
 
if ( !checkAICode($comment_code) && !$wgUser->isAllowed('userrights') )
//die( 'Error: please enter the valid authorization code.');
die( 'Error: please enter the valid authorization
code.'.$comment_code."+".checkAICode($comment_code)."+".$_SESSION['veriword']);
 
Plus loin,
Weiter unten,
Below
 
</textarea>
{$metadata}
<p>
          <input type=\"text\" name=\"code\" id=\"code\" value=\"\" size=\"20\" tabindex=\"4\" />
          <label for=\"code\">Enter this code: </label>
          <img src=\"{$authimage}\" width=\"155\" height=\"50\" alt=\"authimage\" />
</p>
<br />{$editsummary}
{$checkboxhtml}


But this doesn't work, unfortunately.

If someone has any comment on this, don't hesitate, even a clue is better than nothing  :-)

Localsettings.php

 
$wgGroupPermissions['*']['edit'] = false;
 
Personal tools