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 99
1010use Magento \Customer \Model \FileProcessor ;
1111use Magento \Framework \App \Filesystem \DirectoryList ;
12+ use Magento \Framework \Filesystem \DriverPool ;
1213
1314/**
1415 * Test for \Magento\Framework\File\Uploader
@@ -102,7 +103,7 @@ public function testUploadFileWithExcessiveFolderName(): void
102103 public function testUploadFileWhenOldMediaGalleryDisabled (string $ directoryCode ): void
103104 {
104105 $ destinationDirectory = $ this ->filesystem ->getDirectoryWrite ($ directoryCode );
105- $ tmpDirectory = $ this ->filesystem ->getDirectoryWrite (DirectoryList::SYS_TMP );
106+ $ tmpDirectory = $ this ->filesystem ->getDirectoryWrite (DirectoryList::SYS_TMP , DriverPool:: FILE );
106107
107108 $ fileName = 'file.txt ' ;
108109 $ destinationDir = 'tmp ' ;
Original file line number Diff line number Diff line change @@ -720,6 +720,7 @@ private function validateFileId(array $fileId): void
720720 if (preg_match ('/\.\.( \\\|\/)/ ' , $ tmpName ) !== 1 ) {
721721 $ allowedFolders = [
722722 sys_get_temp_dir (),
723+ $ this ->directoryList ->getPath (DirectoryList::SYS_TMP ),
723724 $ this ->directoryList ->getPath (DirectoryList::MEDIA ),
724725 $ this ->directoryList ->getPath (DirectoryList::VAR_DIR ),
725726 $ this ->directoryList ->getPath (DirectoryList::TMP ),
You can’t perform that action at this time.
0 commit comments