[ruby/rss] Only check taint on Ruby <2.7

Ruby 2.7 deprecates taint and it no longer has an effect.
This commit is contained in:
Jeremy Evans 2019-11-14 12:30:56 -08:00
parent 50013f7ebc
commit 23f1fb0663
Notes: git 2019-11-18 08:01:13 +09:00

View File

@ -120,7 +120,7 @@ module RSS
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