Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1271,6 +1271,7 @@ |
1272 | 1272 | $wgAutoblockExpiry = 86400; # Number of seconds before autoblock entries expire |
1273 | 1273 | $wgBlockAllowsUTEdit = false; # Default setting for option on block form to allow self talkpage editing whilst blocked |
1274 | 1274 | $wgSysopEmailBans = true; # Allow sysops to ban users from accessing Emailuser |
| 1275 | +$wgBlockCIDRLimit = 16; # Blocks below the /16 set of IPs will not be allowed |
1275 | 1276 | |
1276 | 1277 | # Pages anonymous user may see as an array, e.g.: |
1277 | 1278 | # array ( "Main Page", "Wikipedia:Help"); |
Index: trunk/phase3/includes/specials/SpecialBlockip.php |
— | — | @@ -345,7 +345,7 @@ |
346 | 346 | * @return array(message key, arguments) on failure, empty array on success |
347 | 347 | */ |
348 | 348 | function doBlock( &$userId = null, &$expiry = null ) { |
349 | | - global $wgUser, $wgSysopUserBans, $wgSysopRangeBans, $wgBlockAllowsUTEdit; |
| 349 | + global $wgUser, $wgSysopUserBans, $wgSysopRangeBans, $wgBlockAllowsUTEdit, $wgBlockCIDRLimit; |
350 | 350 | |
351 | 351 | $userId = 0; |
352 | 352 | # Expand valid IPv6 addresses, usernames are left as is |
— | — | @@ -361,7 +361,7 @@ |
362 | 362 | if( preg_match( "/^($rxIP4)\\/(\\d{1,2})$/", $this->BlockAddress, $matches ) ) { |
363 | 363 | # IPv4 |
364 | 364 | if( $wgSysopRangeBans ) { |
365 | | - if( !IP::isIPv4( $this->BlockAddress ) || $matches[2] < 16 || $matches[2] > 32 ) { |
| 365 | + if( !IP::isIPv4( $this->BlockAddress ) || $matches[2] < $wgBlockCIDRLimit || $matches[2] > 32 ) { |
366 | 366 | return array( 'ip_range_invalid' ); |
367 | 367 | } |
368 | 368 | $this->BlockAddress = Block::normaliseRange( $this->BlockAddress ); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -90,6 +90,8 @@ |
91 | 91 | * $wgCapitalLinkOverrides added to configure per-namespace capitalization |
92 | 92 | * (bug 21172) $wgSorbsUrl can now be an array with multiple DNSBL |
93 | 93 | * $wgEnableHtmlDiff has been removed |
| 94 | +* (bug 3340) $wgBlockCIDRLimit added (default: 16) to configure the low end of |
| 95 | + CIDR ranges for blocking |
94 | 96 | |
95 | 97 | === New features in 1.16 === |
96 | 98 | |