Skip to content

Commit 4817632

Browse files
committed
MAGETWO-88645: Error while deleting a Product Image
1 parent 8eb668b commit 4817632

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/code/Magento/Catalog/Model/Product/Gallery/UpdateHandler.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ protected function processDeletedImages($product, array &$images)
3232
foreach ($images as &$image) {
3333
if (!empty($image['removed'])) {
3434
if (!empty($image['value_id']) && !isset($picturesInOtherStores[$image['file']])) {
35+
if (preg_match('/\.\.(\\\|\/)/', $image['file'])) {
36+
continue;
37+
}
3538
$recordsToDelete[] = $image['value_id'];
3639
$catalogPath = $this->mediaConfig->getBaseMediaPath();
3740
$isFile = $this->mediaDirectory->isFile($catalogPath . $image['file']);

0 commit comments

Comments
 (0)