r59548 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59547‎ | r59548 | r59549 >
Date:16:13, 29 November 2009
Author:demon
Status:reverted
Tags:
Comment:
Add $wgWikiId to override default wfWikiId() output. Solves bug 21086 (security issue: generateSitemap.php does use wfWikiID in sitemap filenames)
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -2896,7 +2896,9 @@
28972897 * This is used as a prefix in memcached keys
28982898 */
28992899 function wfWikiID() {
2900 - global $wgDBprefix, $wgDBname;
 2900+ global $wgDBprefix, $wgDBname, $wgWikiId;
 2901+ if( $wgWikiId )
 2902+ return $wgWikiId;
29012903 if ( $wgDBprefix ) {
29022904 return "$wgDBname-$wgDBprefix";
29032905 } else {
Index: trunk/phase3/includes/DefaultSettings.php
@@ -713,6 +713,12 @@
714714 */
715715 $wgLBFactoryConf = array( 'class' => 'LBFactory_Simple' );
716716
 717+/**
 718+ * Unique identifier if you're paranoid and don't want $wgDBname as part of
 719+ * wfWikiId(). See bug 21086
 720+ */
 721+$wgWikiId = false;
 722+
717723 /** How long to wait for a slave to catch up to the master */
718724 $wgMasterWaitTimeout = 10;
719725
Index: trunk/phase3/RELEASE-NOTES
@@ -98,6 +98,7 @@
9999 CIDR ranges for blocking
100100 * $wgUseInstantCommons added for quick and easy enabling of Commons as a remote
101101 file repository
 102+* $wgWikiId added to override default output of wfWikiId()
102103
103104 === New features in 1.16 ===
104105

Follow-up revisions

RevisionCommit summaryAuthorDate
r60960Reverted r59548 (reopens bug 21086)....tstarling05:20, 12 January 2010
r88015(bug 21086) generateSitemap.php uses wfWikiID() in sitemap filenames...demon17:54, 13 May 2011

Status & tagging log