r14200 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r14199‎ | r14200 | r14201 >
Date:17:32, 13 May 2006
Author:robchurch
Status:old
Tags:
Comment:
(bug 5370) Allow throttling of password reminder requests with the rate limiter
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/SpecialUserlogin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialUserlogin.php
@@ -364,6 +364,14 @@
365365 * @private
366366 */
367367 function mailPassword() {
 368+ global $wgUser, $wgOut;
 369+
 370+ # Check against the rate limiter
 371+ if( $wgUser->pingLimiter( 'mailpassword' ) ) {
 372+ $wgOut->rateLimited();
 373+ return;
 374+ }
 375+
368376 if ( '' == $this->mName ) {
369377 $this->mainLoginForm( wfMsg( 'noname' ) );
370378 return;
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1823,6 +1823,9 @@
18241824 'ip' => null,
18251825 'subnet' => null,
18261826 ),
 1827+ 'mailpassword' => array(
 1828+ 'anon' => NULL,
 1829+ ),
18271830 );
18281831
18291832 /**
Index: trunk/phase3/RELEASE-NOTES
@@ -255,6 +255,7 @@
256256 * Ignore the user and user talk namespaces on Special:Wantedpages
257257 * Introduce NUMBEROFPAGES magic word
258258 * (bug 5833) Introduce CURRENTVERSION magic word
 259+* (bug 5370) Allow throttling of password reminder requests with the rate limiter
259260
260261 == Compatibility ==
261262

Status & tagging log