Project

General

Profile

Bug #14429

Overzealous escaping of + in Shellwords

Added by woodruffw (William Woodruff) 4 months ago. Updated 14 days ago.

Status:
Open
Priority:
Normal
Assignee:
-
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.

History

#1 [ruby-core:87010] Updated by woodruffw (William Woodruff) 14 days ago

Ping (and confirming that this is still the case on 2.5.1p57).

Also available in: Atom PDF