r92938 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92937‎ | r92938 | r92939 >
Date:09:51, 23 July 2011
Author:aaron
Status:ok
Tags:
Comment:
MFT r92937
Modified paths:
  • /branches/wmf/1.17wmf1/includes/specials/SpecialUserlogin.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/includes/specials/SpecialUserlogin.php
@@ -571,6 +571,7 @@
572572 */
573573 public static function incLoginThrottle( $username ) {
574574 global $wgPasswordAttemptThrottle, $wgMemc;
 575+ $username = trim( $username ); // sanity
575576
576577 $throttleCount = 0;
577578 if ( is_array( $wgPasswordAttemptThrottle ) ) {
@@ -598,6 +599,7 @@
599600 */
600601 public static function clearLoginThrottle( $username ) {
601602 global $wgMemc;
 603+ $username = trim( $username ); // sanity
602604
603605 $throttleKey = wfMemcKey( 'password-throttle', wfGetIP(), md5( $username ) );
604606 $wgMemc->delete( $throttleKey );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r92937Dummy-proof incLoginThrottle/clearLoginThrottle with trim()aaron09:49, 23 July 2011

Status & tagging log