Avoid possible register_globals issue.
This commit is contained in:
parent
cc9a75d77e
commit
3c7435421a
1 changed files with 5 additions and 4 deletions
|
|
@ -900,6 +900,11 @@ class UploadForm {
|
|||
$useAjaxDestCheck = $wgUseAjax && $wgAjaxUploadDestCheck;
|
||||
$useAjaxLicensePreview = $wgUseAjax && $wgAjaxLicensePreview;
|
||||
|
||||
// Initilaize $extensionList here in case it is not set later on
|
||||
// (which would cause a E_NOTICE) and it must not be set only if it
|
||||
// isn't set to avoid a possible register_globals issue.
|
||||
$extensionList = '';
|
||||
|
||||
$adc = wfBoolToStr( $useAjaxDestCheck );
|
||||
$alp = wfBoolToStr( $useAjaxLicensePreview );
|
||||
$autofill = wfBoolToStr( $this->mDesiredDestName == '' );
|
||||
|
|
@ -1059,10 +1064,6 @@ wgUploadAutoFill = {$autofill};
|
|||
|
||||
$encComment = htmlspecialchars( $this->mComment );
|
||||
|
||||
if( !isset( $extensionsList ) ) {
|
||||
$extensionsList = '';
|
||||
}
|
||||
|
||||
$wgOut->addHTML(
|
||||
Xml::openElement( 'form', array( 'method' => 'post', 'action' => $titleObj->getLocalURL(),
|
||||
'enctype' => 'multipart/form-data', 'id' => 'mw-upload-form' ) ) .
|
||||
|
|
|
|||
Loading…
Reference in a new issue