* New hook AbortNewAccountAuto, called before account creation from AuthPlugin-
or ExtUser-driven requests.
* $wgCapitalLinkOverrides added to configure per-namespace capitalization
+* (bug 21172) $wgSorbsUrl can now be an array with multiple DNSBL
=== New features in 1.16 ===
$wgEnableTooltipsAndAccesskeys = true;
/**
- * Use http.dnsbl.sorbs.net to check for open proxies
+ * Whether to use DNS blacklists in $wgSorbsUrl to check for open proxies
*/
$wgEnableSorbs = false;
-$wgSorbsUrl = 'http.dnsbl.sorbs.net.';
+
+/**
+ * List of DNS blacklists to use, if $wgEnableSorbs is true
+ */
+$wgSorbsUrl = array( 'http.dnsbl.sorbs.net.' );
/**
* Proxy whitelist, list of addresses that are assumed to be non-proxy despite
* Whether the given IP is in a given DNS blacklist.
*
* @param $ip \string IP to check
- * @param $base \string URL of the DNS blacklist
+ * @param $bases \string or Array of Strings: URL of the DNS blacklist
* @return \bool True if blacklisted.
*/
- function inDnsBlacklist( $ip, $base ) {
+ function inDnsBlacklist( $ip, $bases ) {
wfProfileIn( __METHOD__ );
$found = false;
# Reverse IP, bug 21255
$ipReversed = implode( '.', array_reverse( explode( '.', $ip ) ) );
- # Make hostname
- $host = "$ipReversed.$base";
+ foreach( (array)$bases as $base ) {
+ # Make hostname
+ $host = "$ipReversed.$base";
- # Send query
- $ipList = gethostbynamel( $host );
+ # Send query
+ $ipList = gethostbynamel( $host );
- if( $ipList ) {
- wfDebug( "Hostname $host is {$ipList[0]}, it's a proxy says $base!\n" );
- $found = true;
- } else {
- wfDebug( "Requested $host, not found in $base.\n" );
+ if( $ipList ) {
+ wfDebug( "Hostname $host is {$ipList[0]}, it's a proxy says $base!\n" );
+ $found = true;
+ break;
+ } else {
+ wfDebug( "Requested $host, not found in $base.\n" );
+ }
}
}