r17528 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r17527‎ | r17528 | r17529 >
Date:22:57, 10 November 2006
Author:werdna
Status:old
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:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -861,9 +861,10 @@
862862 }
863863
864864 function inSorbsBlacklist( $ip ) {
865 - global $wgEnableSorbs;
 865+ global $wgEnableSorbs, $wgSorbsUrl;
 866+
866867 return $wgEnableSorbs &&
867 - $this->inDnsBlacklist( $ip, 'http.dnsbl.sorbs.net.' );
 868+ $this->inDnsBlacklist( $ip, $wgSorbsUrl );
868869 }
869870
870871 function inDnsBlacklist( $ip, $base ) {
Index: trunk/phase3/includes/DefaultSettings.php
@@ -2059,6 +2059,7 @@
20602060 * Use http.dnsbl.sorbs.net to check for open proxies
20612061 */
20622062 $wgEnableSorbs = false;
 2063+$wgSorbsUrl = 'http.dnsbl.sorbs.net';
20632064
20642065 /**
20652066 * Proxy whitelist, list of addresses that are assumed to be non-proxy despite what the other
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1811,9 +1811,9 @@
18121812 'ipb_cant_unblock' => 'Error: Block ID $1 not found. It may have been unblocked already.',
18131813 '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.',
18141814 'proxyblocksuccess' => 'Done.',
1815 -'sorbs' => 'SORBS DNSBL',
1816 -'sorbsreason' => 'Your IP address is listed as an open proxy in the [http://www.sorbs.net SORBS] DNSBL.',
1817 -'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',
 1815+'sorbs' => 'DNSBL',
 1816+'sorbsreason' => 'Your IP address is listed as an open proxy in the DNSBL used by this site.',
 1817+'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',
18181818
18191819
18201820 # Developer tools

Follow-up revisions

RevisionCommit summaryAuthorDate
r24193Housekeeping...raymond07:07, 17 July 2007
r24215Merged revisions 24095-24212 via svnmerge from...david21:19, 17 July 2007