Skip to content

fix shell injection upon calling pdftk - #6

Open
ntevenhere wants to merge 1 commit into
pnlng:masterfrom
ntevenhere:shell-injection-fix
Open

fix shell injection upon calling pdftk#6
ntevenhere wants to merge 1 commit into
pnlng:masterfrom
ntevenhere:shell-injection-fix

Conversation

@ntevenhere

Copy link
Copy Markdown

I came across an error like this:

$ pdfoutliner toc.txt --inpdf "(John Smith) IRS.pdf" --outpdf '(John Smith) IRS new.pdf'
sh: 1: Syntax error: "(" unexpected

Again the argument is easily intepreted as a shell command, which easily causes trouble:

$ pdfoutliner toc.txt --inpdf "IRS.pdf" --outpdf '; exit'
Error: Failed to open output file:
   /home/user/
   No output created.
   No output created.

(I should be able to name a file '; exit' if I want to)

I came across an error like this:

```
$ pdfoutliner toc.txt --inpdf "(John Smith) IRS.pdf" --outpdf '(John Smith) IRS new.pdf'
sh: 1: Syntax error: "(" unexpected
```

Again the argument is easily intepreted as a shell command, which easily causes trouble:

```
$ pdfoutliner toc.txt --inpdf "IRS.pdf" --outpdf '; exit'
Error: Failed to open output file:
   /home/user/
   No output created.
   No output created.
```

(I should be able to name a file '; exit' if I want to)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant