We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8b0a0d7 + 04f44c3 commit 826553bCopy full SHA for 826553b
app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php
@@ -67,6 +67,11 @@ public function execute()
67
}
68
$directory = $this->filesystem->getDirectoryRead(DirectoryList::VAR_DIR);
69
$path = $directory->getAbsolutePath() . 'export/' . $fileName;
70
+
71
+ if (!$directory->isFile($path)) {
72
+ throw new LocalizedException(__('Sorry, but the data is invalid or the file is not uploaded.'));
73
+ }
74
75
$this->file->deleteFile($path);
76
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
77
$resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
0 commit comments