Skip to content

Commit

Permalink
escapeshellarg
Browse files Browse the repository at this point in the history
  • Loading branch information
howtomakeaturn committed Mar 21, 2015
1 parent 44ffa4e commit 1241066
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Howtomakeaturn/PDFInfo/PDFInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ public function loadOutput()
{
$cmd = "pdfinfo"; // Linux

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

$this->output = $output;
}
Expand Down

0 comments on commit 1241066

Please sign in to comment.