r34622 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r34621‎ | r34622 | r34623 >
Date:17:31, 11 May 2008
Author:minuteelectron
Status:old
Tags:
Comment:
Avoid possible register_globals issue.
Modified paths:
  • /trunk/phase3/includes/SpecialUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialUpload.php
@@ -900,6 +900,11 @@
901901 $useAjaxDestCheck = $wgUseAjax && $wgAjaxUploadDestCheck;
902902 $useAjaxLicensePreview = $wgUseAjax && $wgAjaxLicensePreview;
903903
 904+ // Initilaize $extensionList here in case it is not set later on
 905+ // (which would cause a E_NOTICE) and it must not be set only if it
 906+ // isn't set to avoid a possible register_globals issue.
 907+ $extensionList = '';
 908+
904909 $adc = wfBoolToStr( $useAjaxDestCheck );
905910 $alp = wfBoolToStr( $useAjaxLicensePreview );
906911 $autofill = wfBoolToStr( $this->mDesiredDestName == '' );
@@ -1059,10 +1064,6 @@
10601065
10611066 $encComment = htmlspecialchars( $this->mComment );
10621067
1063 - if( !isset( $extensionsList ) ) {
1064 - $extensionsList = '';
1065 - }
1066 -
10671068 $wgOut->addHTML(
10681069 Xml::openElement( 'form', array( 'method' => 'post', 'action' => $titleObj->getLocalURL(),
10691070 'enctype' => 'multipart/form-data', 'id' => 'mw-upload-form' ) ) .

Follow-up revisions

RevisionCommit summaryAuthorDate
r34698Revert r34619, r34622 and do it right. :)...brion23:46, 12 May 2008

Status & tagging log