Index: branches/wmf/1.17wmf1/includes/specials/SpecialUserlogin.php |
— | — | @@ -571,6 +571,7 @@ |
572 | 572 | */ |
573 | 573 | public static function incLoginThrottle( $username ) { |
574 | 574 | global $wgPasswordAttemptThrottle, $wgMemc; |
| 575 | + $username = trim( $username ); // sanity |
575 | 576 | |
576 | 577 | $throttleCount = 0; |
577 | 578 | if ( is_array( $wgPasswordAttemptThrottle ) ) { |
— | — | @@ -598,6 +599,7 @@ |
599 | 600 | */ |
600 | 601 | public static function clearLoginThrottle( $username ) { |
601 | 602 | global $wgMemc; |
| 603 | + $username = trim( $username ); // sanity |
602 | 604 | |
603 | 605 | $throttleKey = wfMemcKey( 'password-throttle', wfGetIP(), md5( $username ) ); |
604 | 606 | $wgMemc->delete( $throttleKey ); |