SECURITY: Return error on invalid XML for SVGs
[lhc/web/wiklou.git] / includes / upload / UploadFromFile.php
index aa0cc77..a00ed32 100644 (file)
@@ -40,7 +40,7 @@ class UploadFromFile extends UploadBase {
        function initializeFromRequest( &$request ) {
                $upload = $request->getUpload( 'wpUploadFile' );
                $desiredDestName = $request->getText( 'wpDestFile' );
-               if( !$desiredDestName ) {
+               if ( !$desiredDestName ) {
                        $desiredDestName = $upload->getName();
                }
 
@@ -79,21 +79,21 @@ class UploadFromFile extends UploadBase {
         * @return array
         */
        public function verifyUpload() {
-               # Check for a post_max_size or upload_max_size overflow, so that a 
+               # Check for a post_max_size or upload_max_size overflow, so that a
                # proper error can be shown to the user
                if ( is_null( $this->mTempPath ) || $this->isEmptyFile() ) {
                        if ( $this->mUpload->isIniSizeOverflow() ) {
-                               return array( 
+                               return array(
                                        'status' => UploadBase::FILE_TOO_LARGE,
-                                       'max' => min( 
-                                               self::getMaxUploadSize( $this->getSourceType() ), 
-                                               wfShorthandToInteger( ini_get( 'upload_max_filesize' ) ), 
+                                       'max' => min(
+                                               self::getMaxUploadSize( $this->getSourceType() ),
+                                               wfShorthandToInteger( ini_get( 'upload_max_filesize' ) ),
                                                wfShorthandToInteger( ini_get( 'post_max_size' ) )
                                        ),
                                );
                        }
                }
-               
+
                return parent::verifyUpload();
        }
 }