From 8c6f5f643150ec98f4d9f5c11d3946a99f5f72d7 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Fri, 10 Nov 2006 22:57:51 +0000 Subject: [PATCH] Make the DNSBL used for proxy blocking configurable. This is better than hard-coding, but a lot of the internal variables still call it SORBS, and unfortunately this will need to continue - as I don't want to break existing configurations. Updated the messages for SORBS blocking to refer generically to a DNSBL, rather than to any particular one. --- includes/DefaultSettings.php | 1 + includes/User.php | 5 +++-- languages/messages/MessagesEn.php | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 9e2ce25d38..b72e67ac00 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -2059,6 +2059,7 @@ $wgDisableHardRedirects = false; * Use http.dnsbl.sorbs.net to check for open proxies */ $wgEnableSorbs = false; +$wgSorbsUrl = 'http.dnsbl.sorbs.net'; /** * Proxy whitelist, list of addresses that are assumed to be non-proxy despite what the other diff --git a/includes/User.php b/includes/User.php index 64084dd5b0..7a3a8856fd 100644 --- a/includes/User.php +++ b/includes/User.php @@ -861,9 +861,10 @@ class User { } function inSorbsBlacklist( $ip ) { - global $wgEnableSorbs; + global $wgEnableSorbs, $wgSorbsUrl; + return $wgEnableSorbs && - $this->inDnsBlacklist( $ip, 'http.dnsbl.sorbs.net.' ); + $this->inDnsBlacklist( $ip, $wgSorbsUrl ); } function inDnsBlacklist( $ip, $base ) { diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 7f2a404f63..63ea596b0c 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1811,9 +1811,9 @@ the list of currently operational bans and blocks.', 'ipb_cant_unblock' => 'Error: Block ID $1 not found. It may have been unblocked already.', 'proxyblockreason' => 'Your IP address has been blocked because it is an open proxy. Please contact your Internet service provider or tech support and inform them of this serious security problem.', 'proxyblocksuccess' => 'Done.', -'sorbs' => 'SORBS DNSBL', -'sorbsreason' => 'Your IP address is listed as an open proxy in the [http://www.sorbs.net SORBS] DNSBL.', -'sorbs_create_account_reason' => 'Your IP address is listed as an open proxy in the [http://www.sorbs.net SORBS] DNSBL. You cannot create an account', +'sorbs' => 'DNSBL', +'sorbsreason' => 'Your IP address is listed as an open proxy in the DNSBL used by this site.', +'sorbs_create_account_reason' => 'Your IP address is listed as an open proxy in the DNSBL used by this site. You cannot create an account', # Developer tools -- 2.20.1