Skip to content

Version 0.7.1

Latest

Choose a tag to compare

@teliosdev teliosdev released this 05 Jan 16:16

Adds a couple major changes to the way the library works. First of all, backends now have a flag called unsafe, which is checked by the Command::Runner when escaping arguments for passing it to the backend. If the backend is unsafe, the data for safe interpolations are escaped, preventing issues with the shell executing the data. Safe backends don't use the shell, so arguments aren't escaped. Unsafe (double) interpolations, in the case of safe backends, can span multiple arguments, whereas safe interpolations can't. These are just a few small things that help the library become more safe.

With this, it requires the developer to call force_unsafe! in order to be able to ensure that data passed through unsafe interpolations can actually be expanded by the shell, such as things like $(uname -a).

As always, it can be installed via gem:

gem install command-runner

or you can place it in your Gemfile:

gem 'command-runner', '~> 0.7.1'