r17528 - Code Review

From MediaWiki.org

Jump to: navigation, search
Repository:MediaWiki
Revision:r17527 | r17528 (on ViewVC) | r17529 >
Date:22:57, 10 November 2006
Author:werdna
Status:new
Tags:
Comment: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.
Modified paths:

Diff [purge]

Index: trunk/phase3/includes/User.php
===================================================================
--- trunk/phase3/includes/User.php	(revision 17527)
+++ trunk/phase3/includes/User.php	(revision 17528)
@@ -861,9 +861,10 @@
 	}
 
 	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 ) {
Index: trunk/phase3/includes/DefaultSettings.php
===================================================================
--- trunk/phase3/includes/DefaultSettings.php	(revision 17527)
+++ trunk/phase3/includes/DefaultSettings.php	(revision 17528)
@@ -2059,6 +2059,7 @@
  * 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
Index: trunk/phase3/languages/messages/MessagesEn.php
===================================================================
--- trunk/phase3/languages/messages/MessagesEn.php	(revision 17527)
+++ trunk/phase3/languages/messages/MessagesEn.php	(revision 17528)
@@ -1811,9 +1811,9 @@
 '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

Follow-up revisions

RevisionCommit summaryAuthorDate
r24193Housekeepingraymond07:07, 17 July 2007
r24215Merged revisions 24095-24212 via svnmerge fromdavid21:19, 17 July 2007
Views
Toolbox