File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
dev/tests/integration/testsuite/Magento/Framework/File
lib/internal/Magento/Framework/File Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 9
9
10
10
use Magento \Customer \Model \FileProcessor ;
11
11
use Magento \Framework \App \Filesystem \DirectoryList ;
12
+ use Magento \Framework \Filesystem \DriverPool ;
12
13
13
14
/**
14
15
* Test for \Magento\Framework\File\Uploader
@@ -102,7 +103,7 @@ public function testUploadFileWithExcessiveFolderName(): void
102
103
public function testUploadFileWhenOldMediaGalleryDisabled (string $ directoryCode ): void
103
104
{
104
105
$ destinationDirectory = $ this ->filesystem ->getDirectoryWrite ($ directoryCode );
105
- $ tmpDirectory = $ this ->filesystem ->getDirectoryWrite (DirectoryList::SYS_TMP );
106
+ $ tmpDirectory = $ this ->filesystem ->getDirectoryWrite (DirectoryList::SYS_TMP , DriverPool:: FILE );
106
107
107
108
$ fileName = 'file.txt ' ;
108
109
$ destinationDir = 'tmp ' ;
Original file line number Diff line number Diff line change @@ -720,6 +720,7 @@ private function validateFileId(array $fileId): void
720
720
if (preg_match ('/\.\.( \\\|\/)/ ' , $ tmpName ) !== 1 ) {
721
721
$ allowedFolders = [
722
722
sys_get_temp_dir (),
723
+ $ this ->directoryList ->getPath (DirectoryList::SYS_TMP ),
723
724
$ this ->directoryList ->getPath (DirectoryList::MEDIA ),
724
725
$ this ->directoryList ->getPath (DirectoryList::VAR_DIR ),
725
726
$ this ->directoryList ->getPath (DirectoryList::TMP ),
You can’t perform that action at this time.
0 commit comments