r40354 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40353‎ | r40354 | r40355 >
Date:02:28, 3 September 2008
Author:tstarling
Status:old
Tags:
Comment:
Reverting r40323, as per comments on wikitech-l. Deprecated doesn't mean removed. It doesn't even mean it'll be removed in the future. It just means you shouldn't use it.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/config/index.php (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/ProxyTools.php (modified) (history)
  • /trunk/phase3/includes/Setup.php (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialBlockme.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ProxyTools.php
@@ -138,7 +138,7 @@
139139 function wfProxyCheck() {
140140 global $wgBlockOpenProxies, $wgProxyPorts, $wgProxyScriptPath;
141141 global $wgMemc, $wgProxyMemcExpiry;
142 - global $wgSecretKey;
 142+ global $wgProxyKey;
143143
144144 if ( !$wgBlockOpenProxies ) {
145145 return;
@@ -154,7 +154,7 @@
155155 # Fork the processes
156156 if ( !$skip ) {
157157 $title = SpecialPage::getTitleFor( 'Blockme' );
158 - $iphash = md5( $ip . $wgSecretKey );
 158+ $iphash = md5( $ip . $wgProxyKey );
159159 $url = $title->getFullURL( 'ip='.$iphash );
160160
161161 foreach ( $wgProxyPorts as $port ) {
Index: trunk/phase3/includes/User.php
@@ -1650,11 +1650,13 @@
16511651 * @private
16521652 */
16531653 function setToken( $token = false ) {
1654 - global $wgSecretKey;
 1654+ global $wgSecretKey, $wgProxyKey;
16551655 $this->load();
16561656 if ( !$token ) {
16571657 if ( $wgSecretKey ) {
16581658 $key = $wgSecretKey;
 1659+ } elseif ( $wgProxyKey ) {
 1660+ $key = $wgProxyKey;
16591661 } else {
16601662 $key = microtime();
16611663 }
Index: trunk/phase3/includes/Setup.php
@@ -150,10 +150,6 @@
151151 wfProfileOut( $fname.'-includes' );
152152 wfProfileIn( $fname.'-misc1' );
153153
154 -# Override SecretKey with ProxyKey if a site is using the old setting
155 -if ( isset( $wgProxyKey ) ) {
156 - $wgSecretKey = $wgProxyKey;
157 -}
158154
159155 $wgIP = false; # Load on demand
160156 # Can't stub this one, it sets up $_GET and $_REQUEST in its constructor
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1357,6 +1357,8 @@
13581358 $wgSecretKey = false;
13591359 /** big list of banned IP addresses, in the keys not the values */
13601360 $wgProxyList = array();
 1361+/** deprecated */
 1362+$wgProxyKey = false;
13611363
13621364 /** Number of accounts each IP address may create, 0 to disable.
13631365 * Requires memcached */
Index: trunk/phase3/includes/specials/SpecialBlockme.php
@@ -8,11 +8,11 @@
99 *
1010 */
1111 function wfSpecialBlockme() {
12 - global $wgRequest, $wgBlockOpenProxies, $wgOut, $wgSecretKey;
 12+ global $wgRequest, $wgBlockOpenProxies, $wgOut, $wgProxyKey;
1313
1414 $ip = wfGetIP();
1515
16 - if( !$wgBlockOpenProxies || $wgRequest->getText( 'ip' ) != md5( $ip . $wgSecretKey ) ) {
 16+ if( !$wgBlockOpenProxies || $wgRequest->getText( 'ip' ) != md5( $ip . $wgProxyKey ) ) {
1717 $wgOut->addWikiMsg( 'proxyblocker-disabled' );
1818 return;
1919 }
Index: trunk/phase3/config/index.php
@@ -1706,7 +1706,7 @@
17071707
17081708 \$wgLanguageCode = \"{$slconf['LanguageCode']}\";
17091709
1710 -\$wgSecretKey = \"$secretKey\";
 1710+\$wgProxyKey = \"$secretKey\";
17111711
17121712 ## Default skin: you can change the default skin. Use the internal symbolic
17131713 ## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook':
Index: trunk/phase3/RELEASE-NOTES
@@ -46,9 +46,6 @@
4747 * $wgAllowExternalImagesFrom may now be an array of multiple strings.
4848 * Introduced $wgEnableImageWhitelist to toggle the on-wiki external image
4949 whitelist on or off.
50 -* $wgProxyKey has been fully deprecated (marked as such since 1.4, never
51 - seems to have been completed). $wgSecretKey is the official documented
52 - setting now.
5350
5451 === New features in 1.14 ===
5552

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r40323Fully deprecate $wgProxyKey. Has been marked as deprecated since 1.4, but nev...demon15:15, 2 September 2008