jenkins-bot has submitted this change and it was merged.
Change subject: Hygiene: Set action for createuser and badlogin
......................................................................
Hygiene: Set action for createuser and badlogin
CAPTCHA classes should always be possible to detect the actual action,
which triggered the CAPTCHA. E.g. to add special fields in getForm().
Change-Id: Ie95305b2e6dcbf527a23c92613755092185e6a05
---
M Captcha.php
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
Bartosz Dziewoński: Looks good to me, approved
jenkins-bot: Verified
diff --git a/Captcha.php b/Captcha.php
index 9f85253..81c882b 100644
--- a/Captcha.php
+++ b/Captcha.php
@@ -134,6 +134,7 @@
function injectEmailUser( &$form ) {
global $wgCaptchaTriggers, $wgOut, $wgUser;
if ( $wgCaptchaTriggers['sendemail'] ) {
+ $this->action = 'sendemail';
if ( $wgUser->isAllowed( 'skipcaptcha' ) ) {
wfDebug( "ConfirmEdit: user group allows
skipping captcha on email sending\n" );
return true;
@@ -156,6 +157,7 @@
function injectUserCreate( &$template ) {
global $wgCaptchaTriggers, $wgOut, $wgUser;
if ( $wgCaptchaTriggers['createaccount'] ) {
+ $this->action = 'usercreate';
if ( $wgUser->isAllowed( 'skipcaptcha' ) ) {
wfDebug( "ConfirmEdit: user group allows
skipping captcha on account creation\n" );
return true;
@@ -184,6 +186,8 @@
function injectUserLogin( &$template ) {
if ( $this->isBadLoginTriggered() ) {
global $wgOut;
+
+ $this->action = 'badlogin';
$captcha = "<div class='captcha'>" .
$wgOut->parse( $this->getMessage( 'badlogin' )
) .
$this->getForm() .
--
To view, visit https://gerrit.wikimedia.org/r/185674
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie95305b2e6dcbf527a23c92613755092185e6a05
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Sumit <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits