* $wgCapitalLinkOverrides added to configure per-namespace capitalization
* (bug 21172) $wgSorbsUrl can now be an array with multiple DNSBL
* $wgEnableHtmlDiff has been removed
+* (bug 3340) $wgBlockCIDRLimit added (default: 16) to configure the low end of
+ CIDR ranges for blocking
=== New features in 1.16 ===
$wgAutoblockExpiry = 86400; # Number of seconds before autoblock entries expire
$wgBlockAllowsUTEdit = false; # Default setting for option on block form to allow self talkpage editing whilst blocked
$wgSysopEmailBans = true; # Allow sysops to ban users from accessing Emailuser
+$wgBlockCIDRLimit = 16; # Blocks below the /16 set of IPs will not be allowed
# Pages anonymous user may see as an array, e.g.:
# array ( "Main Page", "Wikipedia:Help");
* @return array(message key, arguments) on failure, empty array on success
*/
function doBlock( &$userId = null, &$expiry = null ) {
- global $wgUser, $wgSysopUserBans, $wgSysopRangeBans, $wgBlockAllowsUTEdit;
+ global $wgUser, $wgSysopUserBans, $wgSysopRangeBans, $wgBlockAllowsUTEdit, $wgBlockCIDRLimit;
$userId = 0;
# Expand valid IPv6 addresses, usernames are left as is
if( preg_match( "/^($rxIP4)\\/(\\d{1,2})$/", $this->BlockAddress, $matches ) ) {
# IPv4
if( $wgSysopRangeBans ) {
- if( !IP::isIPv4( $this->BlockAddress ) || $matches[2] < 16 || $matches[2] > 32 ) {
+ if( !IP::isIPv4( $this->BlockAddress ) || $matches[2] < $wgBlockCIDRLimit || $matches[2] > 32 ) {
return array( 'ip_range_invalid' );
}
$this->BlockAddress = Block::normaliseRange( $this->BlockAddress );