zenhob / hcl

Command-line tool for manipulating Harvest timesheets
http://zenhob.github.io/hcl
MIT License
223 stars 45 forks source link

App#save_password: Shell escape password #88

Open teddywing opened 6 years ago

teddywing commented 6 years ago

Escape special shell characters so that passwords with single quotes can be saved to the keychain. Otherwise, the single quotes surrounding the "-w '%s'" cause an error on passwords with single quotes.

I know testing private methods is not recommended, but this seemed like something that would be good to test. Maybe the method should be made public if that's a concern?