r107007 MediaWiki - Code Review archive
Repository:
MediaWiki
Revision:
<
r107006
|
r107007
|
r107008
>
Date:
23:39, 21 December 2011
Author:
platonides
Status:
ok
Tags:
Comment:
Don't check badlogin attempts in memcached if we are not configured to show captchas on bad login.
Solves problem reported in
http://www.mediawiki.org/w/index.php?title=Extension_talk:ConfirmEdit&offset=20111218172150#Banned_user_got_banned_until_he_logs_in_9982
where "$wgCaptchaTriggers['badlogin'] = false was set to disable that captcha, but as the user had already passed the threshold, it still was shown.
Modified paths:
/trunk/extensions/ConfirmEdit/Captcha.php
(modified) (
history
)
Diff
[
purge
]
Index: trunk/extensions/ConfirmEdit/Captcha.php
—
—
@@ -168,8 +168,8 @@
169
169
* @access private
170
170
*/
171
171
function isBadLoginTriggered() {
172
- global $wgMemc, $wgCaptchaBadLoginAttempts;
173
- return intval( $wgMemc->get( $this->badLoginKey() ) ) >= $wgCaptchaBadLoginAttempts;
172
+ global $wgMemc, $wgCaptchaTriggers, $wgCaptchaBadLoginAttempts;
173
+ return $wgCaptchaTriggers['badlogin'] && intval( $wgMemc->get( $this->badLoginKey() ) ) >= $wgCaptchaBadLoginAttempts;
174
174
}
175
175
176
176
/**
Status & tagging log
01:37, 13 June 2012
Krinkle
(
talk
|
contribs
)
changed the
tags
for r107007
[
removed:
confirmedit]
17:45, 13 January 2012
Nikerabbit
(
talk
|
contribs
)
changed the
status
of r107007
[
removed:
new
added:
ok]
06:40, 5 January 2012
RobLa-WMF
(
talk
|
contribs
)
changed the
tags
for r107007
[
added:
confirmedit]