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>
Sun, 5 Dec 2021 23:55:44 +0000 (23:55 +0000)
commit94018d778f2e6b7765a858c359c88d46fd9966ec
treed5b7d492bddc074100308e1a2d5af0a9b19bfabb
parent2c655396c50ed693992fafa073fc4560e904102e
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