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.
1 parent 68e216c commit 6425e3dCopy full SHA for 6425e3d
AdobeStockImage/Model/SaveImage.php
@@ -72,6 +72,9 @@ public function __construct(
72
public function execute(Document $document, string $url, string $destinationPath): void
73
{
74
try {
75
+ if (!preg_match('/^[a-zA-Z0-9\.\-\_\/\s]+$/i', $destinationPath)) {
76
+ throw new LocalizedException(__('Image File has invalid characters.'));
77
+ }
78
$this->saveFile->execute($document, $url, $destinationPath);
79
$mediaAssetId = $this->saveMediaGalleryAsset->execute($document, $destinationPath);
80
0 commit comments