ruby-changes:58807
From: Jeremy <ko1@a...>
Date: Mon, 18 Nov 2019 08:19:25 +0900 (JST)
Subject: [ruby-changes:58807] 23f1fb0663 (master): [ruby/rss] Only check taint on Ruby <2.7
https://git.ruby-lang.org/ruby.git/commit/?id=23f1fb0663 From 23f1fb066303838a0d045b5981fe3c4ad077399e Mon Sep 17 00:00:00 2001 From: Jeremy Evans <code@j...> Date: Thu, 14 Nov 2019 12:30:56 -0800 Subject: [ruby/rss] Only check taint on Ruby <2.7 Ruby 2.7 deprecates taint and it no longer has an effect. diff --git a/lib/rss/parser.rb b/lib/rss/parser.rb index 3a34d0a..e1bcfc5 100644 --- a/lib/rss/parser.rb +++ b/lib/rss/parser.rb @@ -120,7 +120,7 @@ module RSS https://github.com/ruby/ruby/blob/trunk/lib/rss/parser.rb#L120 if uri.respond_to?(:read) uri.read - elsif !rss.tainted? and File.readable?(rss) + elsif (RUBY_VERSION >= '2.7' || !rss.tainted?) and File.readable?(rss) File.open(rss) {|f| f.read} else rss -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/