gabetax/wkhtmltopdf_binary_gem — pull request #1 by gabetax (2012-06-18 22:08:38+00:00)
Title: Escape arguments passed to wrapper script

This fixes a potential security vulnerability, and allows handling arguments, like filenames, containing spaces. Previously a user-provided filename could be used to run arbitrary commands, e.g.

$ ./wkhtmltopdf http://www.google.com "; whoami"

This patch correctly escapes arguments using `Kernel#system`'s support of arrays to specify parameters.