r57910 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57909‎ | r57910 | r57911 >
Date:19:35, 19 October 2009
Author:tstarling
Status:deferred
Tags:
Comment:
Merging r57908 from trunk
Modified paths:
  • /branches/wmf-deployment/RELEASE-NOTES (modified) (history)
  • /branches/wmf-deployment/includes/DefaultSettings.php (modified) (history)
  • /branches/wmf-deployment/includes/User.php (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/includes/User.php
@@ -1202,11 +1202,18 @@
12031203 */
12041204 public function isPingLimitable() {
12051205 global $wgRateLimitsExcludedGroups;
 1206+ global $wgRateLimitsExcludedIPs;
12061207 if( array_intersect( $this->getEffectiveGroups(), $wgRateLimitsExcludedGroups ) ) {
12071208 // Deprecated, but kept for backwards-compatibility config
12081209 return false;
12091210 }
1210 - return !$this->isAllowed( 'noratelimit' );
 1211+ if( in_array( wfGetIP(), $wgRateLimitsExcludedIPs ) ) {
 1212+ // No other good way currently to disable rate limits
 1213+ // for specific IPs. :P
 1214+ // But this is a crappy hack and should die.
 1215+ return false;
 1216+ }
 1217+ return !$this->isAllowed('noratelimit');
12111218 }
12121219
12131220 /**
Index: branches/wmf-deployment/includes/DefaultSettings.php
@@ -3565,6 +3565,12 @@
35663566 $wgRateLimitsExcludedGroups = array();
35673567
35683568 /**
 3569+ * Array of IPs which should be excluded from rate limits.
 3570+ * This may be useful for whitelisting NAT gateways for conferences, etc.
 3571+ */
 3572+$wgRateLimitsExcludedIPs = array();
 3573+
 3574+/**
35693575 * On Special:Unusedimages, consider images "used", if they are put
35703576 * into a category. Default (false) is not to count those as used.
35713577 */
Index: branches/wmf-deployment/RELEASE-NOTES
@@ -241,6 +241,8 @@
242242 called after a user's email has been successfully confirmed or invalidated.
243243 * (bug 19741) Moved the XCF files out of the main MediaWiki distribution, for
244244 a smaller subversion checkout.
 245+* Added $wgRateLimitsExcludedIPs, to allow specific IPs to be whitelisted from
 246+ rate limits.
245247
246248
247249 === Bug fixes in 1.16 ===

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r57908Reintroduced $wgRateLimitsExcludedIPs from r47352 (removed in r51045). $wgAut...tstarling19:11, 19 October 2009

Status & tagging log