Closed postmodern closed 1 year ago
I highly doubt this is even used in the wild, so it's probably not worth waiting for a major version.
Also, I wasn't sure if I should report Deprecation RFCs to here, or to https://bugs.ruby-lang.org/.
Oops, I should have reported this to ruby/open-uri.
I believe that
URI.open()
should not accept"|command"
style arguments (ex:URI.open("|ls")
). I understand thatURI.open()
builds uponKernel.open()
, which does accept"|command"
style arguments, however"|command-here"
is not a valid URI and thus should not be accepted byURI.open()
. This would also help close a common vulnerability code path where developers pass arbitrary user input toURI.open()
assuming that only valid URIs will be passed to it, but an attacker can achieve Remote Command Execution by passing in|evil-command-here
instead of ahttps://
URI.This could be deprecated with a warning at first, then removed entirely in Ruby 4.0.0.