Index: trunk/extensions/TorBlock/TorBlock.php |
— | — | @@ -50,12 +50,6 @@ |
51 | 51 | $wgTorLoadNodes = true; |
52 | 52 | |
53 | 53 | /** |
54 | | - * What IPs people can access your site with. |
55 | | - * Needed for checking against exit policies. |
56 | | - */ |
57 | | -$wgTorIPs = array(); |
58 | | - |
59 | | -/** |
60 | 54 | * Actions tor users are allowed to do. |
61 | 55 | * E.g. to allow account creation, add createaccount. |
62 | 56 | */ |
— | — | @@ -73,3 +67,8 @@ |
74 | 68 | * (i.e. all IPs which can be used to access the site. |
75 | 69 | */ |
76 | 70 | $wgTorIPs = array( '208.80.152.2' ); |
| 71 | + |
| 72 | +/** |
| 73 | + * Disable existing blocks of Tor nodes |
| 74 | + */ |
| 75 | +$wgTorDisableAdminBlocks = true; |
Index: trunk/extensions/TorBlock/TorBlock.class.php |
— | — | @@ -117,7 +117,8 @@ |
118 | 118 | } |
119 | 119 | |
120 | 120 | public static function onGetBlockedStatus( &$user ) { |
121 | | - if (self::isExitNode() && $user->mBlock && !$user->mBlock->mUser) { |
| 121 | + global $wgTorDisableAdminBlocks; |
| 122 | + if ($wgTorDisableAdminBlocks && self::isExitNode() && $user->mBlock && !$user->mBlock->mUser) { |
122 | 123 | wfDebug( "User using Tor node. Disabling IP block as it was probably targetted at the tor node." ); |
123 | 124 | // Node is probably blocked for being a Tor node. Remove block. |
124 | 125 | $user->mBlockedby = 0; |
— | — | @@ -153,4 +154,4 @@ |
154 | 155 | |
155 | 156 | return true; |
156 | 157 | } |
157 | | -} |
\ No newline at end of file |
| 158 | +} |