From: william@... Date: 2018-05-13T23:32:19+00:00 Subject: [ruby-core:87010] [Ruby trunk Bug#14429] Overzealous escaping of + in Shellwords Issue #14429 has been updated by woodruffw (William Woodruff). Ping (and confirming that this is still the case on `2.5.1p57`). ---------------------------------------- Bug #14429: Overzealous escaping of + in Shellwords https://bugs.ruby-lang.org/issues/14429#change-71977 * Author: woodruffw (William Woodruff) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-linux-gnu] * Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN ---------------------------------------- The `Shellwords` module is currently a little too conservative: `+` isn't a token in Bourne sh[1], but `Shellwords` escapes it anyways. Actual: ~~~ ruby >> Shellwords.escape 'foo+bar' #=> "foo\\+bar" ~~~ Expected: ~~~ ruby >> Shellwords.escape 'foo+bar' #=> "foo+bar" ~~~ I'm reporting this on ruby 2.4.3, but it looks like ruby-trunk is also affected[2]. [1]: http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html [2]: https://github.com/ruby/ruby/blob/trunk/lib/shellwords.rb#L150 -- https://bugs.ruby-lang.org/ Unsubscribe: