r76339 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76338‎ | r76339 | r76340 >
Date:20:51, 8 November 2010
Author:platonides
Status:ok
Tags:
Comment:
Revert r72959
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -462,7 +462,6 @@
463463 'loginlanguagelabel',
464464 'loginlanguagelinks',
465465 'suspicious-userlogout',
466 - 'ratelimit-excluded-ips',
467466 ),
468467 'passwordstrength' => array(
469468 'password-strength',
Index: trunk/phase3/includes/User.php
@@ -1224,34 +1224,10 @@
12251225 // Deprecated, but kept for backwards-compatibility config
12261226 return false;
12271227 }
1228 -
1229 - wfDebug( "Checking the list of IP addresses excluded from rate limit..\n" );
1230 -
1231 - // Read list of IP addresses from MediaWiki namespace
1232 - $message = wfMsgForContentNoTrans( 'ratelimit-excluded-ips' );
1233 - $lines = explode( "\n", $message );
1234 - foreach( $lines as $line ) {
1235 - // Remove comment lines
1236 - $comment = substr( trim( $line ), 0, 1 );
1237 - if ( $comment == '#' || $comment == '' ) {
1238 - continue;
1239 - }
1240 - // Remove additional comments after an IP address
1241 - $comment = strpos( $line, '#' );
1242 - if ( $comment > 0 ) {
1243 - $line = trim( substr( $line, 0, $comment-1 ) );
1244 - if ( IP::isValid( $line ) ) {
1245 - $wgRateLimitsExcludedIPs[] = IP::sanitizeIP( $line );
1246 - }
1247 - }
1248 - }
1249 -
1250 - $ip = IP::sanitizeIP( wfGetIP() );
1251 - if( in_array( $ip, $wgRateLimitsExcludedIPs ) ) {
 1228+ if( in_array( wfGetIP(), $wgRateLimitsExcludedIPs ) ) {
12521229 // No other good way currently to disable rate limits
12531230 // for specific IPs. :P
12541231 // But this is a crappy hack and should die.
1255 - wfDebug( "IP $ip matches the list of rate limit excluded IPs\n" );
12561232 return false;
12571233 }
12581234 return !$this->isAllowed('noratelimit');
Index: trunk/phase3/includes/DefaultSettings.php
@@ -3446,8 +3446,6 @@
34473447 /**
34483448 * Array of IPs which should be excluded from rate limits.
34493449 * This may be useful for whitelisting NAT gateways for conferences, etc.
3450 - * Wiki administrators can add additional IP addresses via
3451 - * [[MediaWiki:Ratelimit-excluded-ips]]
34523450 */
34533451 $wgRateLimitsExcludedIPs = array();
34543452
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1141,11 +1141,6 @@
11421142 * Italiano|it
11431143 * Nederlands|nl', # do not translate or duplicate this message to other languages
11441144 'suspicious-userlogout' => 'Your request to log out was denied because it looks like it was sent by a broken browser or caching proxy.',
1145 -'ratelimit-excluded-ips' => ' #<!-- leave this line exactly as it is --> <pre>
1146 -# Syntax is as follows:
1147 -# * Everything from a "#" character to the end of the line is a comment
1148 -# * Every non-blank line is an IP address excluded from the rate limit
1149 - #</pre> <!-- leave this line exactly as it is -->',
11501145
11511146 # JavaScript password checks
11521147 'password-strength' => 'Estimated password strength: $1',
Index: trunk/phase3/RELEASE-NOTES
@@ -181,8 +181,6 @@
182182 * (bug 24007) Diff pages now mention the number of users having edited
183183 intermediate revisions
184184 * Added new hook GetIP
185 -* (bug 16574) Allow administrators to temporarily disable the account creation
186 - limit for IP addresses: [[MediaWiki:Ratelimit-excluded-ips]]
187185 * Special:Version now displays whether a SQLite database supports full-text
188186 search.
189187 * TS_ISO_8691_BASIC was added as a time format, which is used by ResourceLoader

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r72959(bug 16574) Allow administrators to temporarily disable the account creation ...raymond08:58, 14 September 2010

Status & tagging log