From 2c12a712272bc84ca8ae00808f43335bfb4651d1 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 12 May 2010 20:30:01 +0000 Subject: [PATCH] Don't escape $wgRightsIcon since it may contain "{$wgScriptPath}" --- includes/installer/LocalSettingsGenerator.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/installer/LocalSettingsGenerator.php b/includes/installer/LocalSettingsGenerator.php index 5d8684ffae..4267b44a88 100644 --- a/includes/installer/LocalSettingsGenerator.php +++ b/includes/installer/LocalSettingsGenerator.php @@ -24,6 +24,7 @@ class LocalSettingsGenerator { 'wgRightsText', 'wgRightsCode', 'wgMainCacheType', 'wgEnableUploads', 'wgMainCacheType', '_MemCachedServers', 'wgDBserver', 'wgDBuser', 'wgDBpassword' ), $db->getGlobalNames() ); + $unescaped = array( 'wgRightsIcon' ); $boolItems = array( 'wgEnableEmail', 'wgEnableUserEmail', 'wgEnotifUserTalk', 'wgEnotifWatchlist', 'wgEmailAuthentication', 'wgEnableUploads' ); foreach( $confItems as $c ) { @@ -31,12 +32,14 @@ class LocalSettingsGenerator { if( in_array( $c, $boolItems ) ) { $val = wfBoolToStr( $val ); } + if ( !in_array( $c, $unescaped ) ) { + $val = self::escapePhpString( $val ); + } $this->values[$c] = $val; } $this->dbSettings = $db->getLocalSettings(); $this->safeMode = $installer->getVar( '_SafeMode' ); $this->values['wgEmergencyContact'] = $this->values['wgPasswordSender']; - $this->values = wfArrayMap( array( 'LocalSettingsGenerator', 'escapePhpString' ), $this->values ); } public static function escapePhpString( $string ) { -- 2.20.1