PermissionManager::getUserPermissions() instead.
* The LocalisationCacheRecache hook no longer allows purging of message blobs
to be prevented. Modifying the $purgeBlobs parameter now has no effect.
+* The use of $wgProxyList with IP addresses in the array keys, deprecated in
+ 1.30, was removed. Instead, $wgProxyList should be an array with IP addresses
+ as the values, or a string path to a file containing one IP address per line.
=== Other changes in 1.34 ===
* …
* Big list of banned IP addresses.
*
* This can have the following formats:
- * - An array of addresses, either in the values
- * or the keys (for backward compatibility, deprecated since 1.30)
- * - A string, in that case this is the path to a file
+ * - An array of addresses
+ * - A string, in which case this is the path to a file
* containing the list of IP addresses, one per line
*/
$wgProxyList = [];
$proxyList = array_map( 'trim', file( $proxyList ) );
}
- $resultProxyList = [];
- $deprecatedIPEntries = [];
-
- // backward compatibility: move all ip addresses in keys to values
- foreach ( $proxyList as $key => $value ) {
- $keyIsIP = IP::isIPAddress( $key );
- $valueIsIP = IP::isIPAddress( $value );
- if ( $keyIsIP && !$valueIsIP ) {
- $deprecatedIPEntries[] = $key;
- $resultProxyList[] = $key;
- } elseif ( $keyIsIP && $valueIsIP ) {
- $deprecatedIPEntries[] = $key;
- $resultProxyList[] = $key;
- $resultProxyList[] = $value;
- } else {
- $resultProxyList[] = $value;
- }
- }
-
- if ( $deprecatedIPEntries ) {
- wfDeprecated(
- 'IP addresses in the keys of $wgProxyList (found the following IP addresses in keys: ' .
- implode( ', ', $deprecatedIPEntries ) . ', please move them to values)', '1.30' );
- }
-
- $proxyListIPSet = new IPSet( $resultProxyList );
+ $proxyListIPSet = new IPSet( $proxyList );
return $proxyListIPSet->match( $ip );
}
];
}
- /**
- * @covers ::isLocallyBlockedProxy
- */
- public function testIsLocallyBlockedProxyDeprecated() {
- $proxy = '1.2.3.4';
-
- $this->hideDeprecated(
- 'IP addresses in the keys of $wgProxyList (found the following IP ' .
- 'addresses in keys: ' . $proxy . ', please move them to values)'
- );
-
- $blockManager = TestingAccessWrapper::newFromObject(
- $this->getBlockManager( [
- 'wgProxyList' => [ $proxy => 'test' ]
- ] )
- );
-
- $ip = '1.2.3.4';
- $this->assertTrue( $blockManager->isLocallyBlockedProxy( $ip ) );
- }
-
/**
* @dataProvider provideIsDnsBlacklisted
* @covers ::isDnsBlacklisted
]
);
$this->assertTrue( User::isLocallyBlockedProxy( $ip ) );
-
- $this->hideDeprecated(
- 'IP addresses in the keys of $wgProxyList (found the following IP ' .
- 'addresses in keys: ' . $blockListEntry . ', please move them to values)'
- );
- $this->setMwGlobals(
- 'wgProxyList',
- [
- $blockListEntry => 'test'
- ]
- );
- $this->assertTrue( User::isLocallyBlockedProxy( $ip ) );
}
/**