source/Application/Controller/Admin/ToolsList.php
protected function _processFiles()
    {
        if (isset($_FILES['myfile']['name'])) {
            // process all files
            foreach ($_FILES['myfile']['name'] as $key => $value) {
                $aSource = $_FILES['myfile']['tmp_name'];
                $sSource = $aSource[$key];
                $value = strtolower($value);
                // add type to name
                $aFilename = explode(".", $value);

                //hack?

                $aBadFiles = ["php", 'php4', 'php5', "jsp", "cgi", "cmf", "exe"];

                if (in_array($aFilename[1], $aBadFiles)) {
                    \OxidEsales\Eshop\Core\Registry::getUtils()->showMessageAndExit("File didn't pass our allowed files filter.");
                }

                //reading SQL dump file
                if (filesize($sSource) > 0) {
                    $rHandle = fopen($sSource, "r");
                    $sContents = fread($rHandle, filesize($sSource));
                    fclose($rHandle);

                    //reading only one SQL dump file
                    return $sContents;
                }

                return;
            }
        }

        return;
    }
protected function _processFiles()
    {
        if (isset($_FILES['myfile']['name'])) {
            // process all files
            foreach ($_FILES['myfile']['name'] as $key => $value) {
                $aSource = $_FILES['myfile']['tmp_name'];
                $sSource = $aSource[$key];
                $value = strtolower($value);
                // add type to name
                $aFilename = explode(".", $value);

                //hack?

                $aBadFiles = ["php", 'php4', 'php5', "jsp", "cgi", "cmf", "exe"];

                if (in_array($aFilename[1], $aBadFiles)) {
                    \OxidEsales\Eshop\Core\Registry::getUtils()->showMessageAndExit("File didn't pass our allowed files filter.");
                }

                //reading SQL dump file
                if (filesize($sSource) > 0) {
                    $rHandle = fopen($sSource, "r");
                    $sContents = fread($rHandle, filesize($sSource));
                    fclose($rHandle);

                    //reading only one SQL dump file
                    return $sContents;
                }

                return;
            }
        }

        return;
    }
protected function _processFiles ( ) { if ( isset ( $ _FILES [ 'myfile' ] [ 'name' ] ) ) { // process all files foreach ( $ _FILES [ 'myfile' ] [ 'name' ] as $ key => $ value ) { $ aSource = $ _FILES [ 'myfile' ] [ 'tmp_name' ] ; $ sSource = $ aSource [ $ key ] ; $ value = strtolower ( $ value ) ; // add type to name $ aFilename = explode ( "." , $ value ) ; //hack? $ aBadFiles = [ "php" , 'php4' , 'php5' , "jsp" , "cgi" , "cmf" , "exe" ] ; if ( in_array ( $ aFilename [ 1 ] , $ aBadFiles ) ) { \ OxidEsales \ Eshop \ Core \ Registry :: getUtils ( ) -> showMessageAndExit ( "File didn't pass our allowed files filter." ) ; } //reading SQL dump file if ( filesize ( $ sSource ) > 0 ) { $ rHandle = fopen ( $ sSource , "r" ) ; $ sContents = fread ( $ rHandle , filesize ( $ sSource ) ) ; fclose ( $ rHandle ) ; //reading only one SQL dump file return $ sContents ; } return ; } } return ; }
Processes files containing SQL queries

@return mixed
Processes files containing SQL queries