Index: branches/wmf-deployment/includes/User.php |
— | — | @@ -1202,11 +1202,18 @@ |
1203 | 1203 | */ |
1204 | 1204 | public function isPingLimitable() { |
1205 | 1205 | global $wgRateLimitsExcludedGroups; |
| 1206 | + global $wgRateLimitsExcludedIPs; |
1206 | 1207 | if( array_intersect( $this->getEffectiveGroups(), $wgRateLimitsExcludedGroups ) ) { |
1207 | 1208 | // Deprecated, but kept for backwards-compatibility config |
1208 | 1209 | return false; |
1209 | 1210 | } |
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'); |
1211 | 1218 | } |
1212 | 1219 | |
1213 | 1220 | /** |
Index: branches/wmf-deployment/includes/DefaultSettings.php |
— | — | @@ -3565,6 +3565,12 @@ |
3566 | 3566 | $wgRateLimitsExcludedGroups = array(); |
3567 | 3567 | |
3568 | 3568 | /** |
| 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 | +/** |
3569 | 3575 | * On Special:Unusedimages, consider images "used", if they are put |
3570 | 3576 | * into a category. Default (false) is not to count those as used. |
3571 | 3577 | */ |
Index: branches/wmf-deployment/RELEASE-NOTES |
— | — | @@ -241,6 +241,8 @@ |
242 | 242 | called after a user's email has been successfully confirmed or invalidated. |
243 | 243 | * (bug 19741) Moved the XCF files out of the main MediaWiki distribution, for |
244 | 244 | a smaller subversion checkout. |
| 245 | +* Added $wgRateLimitsExcludedIPs, to allow specific IPs to be whitelisted from |
| 246 | + rate limits. |
245 | 247 | |
246 | 248 | |
247 | 249 | === Bug fixes in 1.16 === |