lib/shell/command-processor.rb (Shell#[]): prevent unknown command
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Tue, 1 Oct 2019 11:01:53 +0000 (11:01 +0000)
committerUtkarsh Gupta <utkarsh@debian.org>
Thu, 1 Oct 2020 13:24:55 +0000 (14:24 +0100)
commitf85d68efb206f06766d5f9be5c9a36ee126285cb
treeaa2504f001ef2968c55aac96f0195dafbbd731ed
parentf503a30b333a6e43bde61f9234ed7b500326cf93
lib/shell/command-processor.rb (Shell#[]): prevent unknown command

Origin: https://github.com/ruby/ruby/commit/3af01ae1101e0b8815ae5a106be64b0e82a58640
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2019-16255

`FileTest.send(command, ...)` allows to call not only FileTest-related
methods but also any method that belongs to Kernel, Object, etc.
patched by <mame@ruby-lang.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@67814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[Salvatore Bonaccorso: Backport to 2.3.3:
 - Context changes in test/shell/test_command_processor.rb
]

Gbp-Pq: Name lib-shell-command-processor.rb-Shell-prevent-unknown.patch
lib/shell/command-processor.rb
test/shell/test_command_processor.rb