mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-24 00:04:15 +00:00
Poke the captcha image & help interface specials into $wgWhitelistRead if necessary
This commit is contained in:
parent
4cccd1b561
commit
5d072acbb9
|
@ -179,6 +179,18 @@ function ceSetup() {
|
||||||
$wgHooks['LoginAuthenticateAudit'][] = array( &$wgCaptcha, 'triggerUserLogin' );
|
$wgHooks['LoginAuthenticateAudit'][] = array( &$wgCaptcha, 'triggerUserLogin' );
|
||||||
$wgHooks['UserLoginForm'][] = array( &$wgCaptcha, 'injectUserLogin' );
|
$wgHooks['UserLoginForm'][] = array( &$wgCaptcha, 'injectUserLogin' );
|
||||||
$wgHooks['AbortLogin'][] = array( &$wgCaptcha, 'confirmUserLogin' );
|
$wgHooks['AbortLogin'][] = array( &$wgCaptcha, 'confirmUserLogin' );
|
||||||
|
|
||||||
|
global $wgGroupPermissions, $wgCaptchaTriggers;
|
||||||
|
if( !$wgGroupPermissions['*']['read'] && $wgCaptchaTriggers['badlogin'] ) {
|
||||||
|
// We need to ensure that the captcha interface is accessible
|
||||||
|
// so that unauthenticated users can actually get in after a
|
||||||
|
// mistaken password typing.
|
||||||
|
global $wgWhitelistRead;
|
||||||
|
$image = Title::makeTitle( NS_SPECIAL, 'Captcha/image' );
|
||||||
|
$help = Title::makeTitle( NS_SPECIAL, 'Captcha/help' );
|
||||||
|
$wgWhitelistRead[] = $image->getPrefixedText();
|
||||||
|
$wgWhitelistRead[] = $help->getPrefixedText();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue