Project

General

Profile

Actions

Bug #14429

closed

Overzealous escaping of + in Shellwords

Added by woodruffw (William Woodruff) about 6 years ago. Updated over 4 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-linux-gnu]
[ruby-core:85316]

Description

The Shellwords module is currently a little too conservative: + isn't a token in Bourne sh1, but Shellwords escapes it anyways.

Actual:

>> Shellwords.escape 'foo+bar' #=> "foo\\+bar"

Expected:

>> Shellwords.escape 'foo+bar' #=> "foo+bar"

I'm reporting this on ruby 2.4.3, but it looks like ruby-trunk is also affected2.


Files

shellwords-plus.patch (1.45 KB) shellwords-plus.patch jeremyevans0 (Jeremy Evans), 06/20/2019 08:26 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0