diff --git a/src/HeicToJpg.php b/src/HeicToJpg.php index da8be5d..9b0c13e 100644 --- a/src/HeicToJpg.php +++ b/src/HeicToJpg.php @@ -185,6 +185,7 @@ public function checkOS($forceArm = false) { * @return void */ protected function processImage(string $source) { + $source = htmlspecialchars($source); $this->heic = $source; $newFileName = $source . "-" . uniqid(rand(), true); $exeName = $this->exeName; @@ -316,7 +317,7 @@ public static function convert(string $source, string $converterPath = "", $forc return (new self) ->checkOS($forceArm) ->setConverterLocation($converterPath) - ->convertImage(htmlspecialchars($source)); + ->convertImage($source); } public static function convertOnMac(string $source, string $arch = "amd64", string $converterPath = "") diff --git a/tests/Unit/images/;whoami;#.heic b/tests/Unit/images/;whoami;#.heic new file mode 100644 index 0000000..7ba2820 Binary files /dev/null and b/tests/Unit/images/;whoami;#.heic differ