Skip to content

Commit 1241066

Browse files
escapeshellarg
1 parent 44ffa4e commit 1241066

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Howtomakeaturn/PDFInfo/PDFInfo.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ public function loadOutput()
3939
{
4040
$cmd = "pdfinfo"; // Linux
4141

42-
$file = $this->file;
42+
$file = escapeshellarg($this->file);
4343
// Parse entire output
4444
// Surround with double quotes if file name has spaces
45-
exec("$cmd \"$file\"", $output);
45+
exec("$cmd $file", $output);
4646

4747
$this->output = $output;
4848
}

0 commit comments

Comments
 (0)