tcocca / active_pdftk

ruby wrapper for the pdftk command line utility for working with editable pdf files
MIT License
46 stars 37 forks source link

Special characters in file paths not being escaped #40

Open SirRawlins opened 10 years ago

SirRawlins commented 10 years ago

Hello Guys,

Got caught out this afternoon by a file which was called 'example (1).pdf' whereby the path is not escaped before sending to bash and therefore throws a syntax error.

I'm proposing that all commands are sanitised/escaped before being sent to bash to prevent this from happening in future.

If other people are happy this is the way to go I'll wrap up a pull-request with the fixes.

Robert

tcocca commented 10 years ago

It would be great if you could wrap up a PR for this.

Also, have you run the specs locally yet? I'm having a bit of an issue, its weird, they pass for me locally, however, I can't get them to run clean on travis. No idea whats up. Kind of why I haven't actually released this to rubygems yet.

Thanks, ~ Tom

SirRawlins commented 10 years ago

@tcocca I'd be more than happy to work on a PR for this. I haven't tried running specs locally yet but will do so before I start work on the PR.

SirRawlins commented 10 years ago

@tcocca I'm looking at putting this PR together this afternoon but Im having issues getting the specs to run - currently about 300 failing, most of the them in the wrapper_spec - Do I need to do anything specific to get these passing? Seems to be a mixture of different reasons for failure.