Use untaint for File.symlink in kernel_require.rb
Partly reverted 7d463e360b9c4718b17378eb52783116a01b884b
This commit is contained in:
parent
b8d242d221
commit
d9978ce5d3
@ -41,7 +41,10 @@ module Kernel
|
|||||||
resolved_path = begin
|
resolved_path = begin
|
||||||
rp = nil
|
rp = nil
|
||||||
$LOAD_PATH[0...Gem.load_path_insert_index || -1].each do |lp|
|
$LOAD_PATH[0...Gem.load_path_insert_index || -1].each do |lp|
|
||||||
safe_lp = lp.dup.tap(&Gem::UNTAINT)
|
# TODO:
|
||||||
|
# for test_require.rb of ruby core test suite
|
||||||
|
# We should use Gem::UNTAINT after https://bugs.ruby-lang.org/issues/16131
|
||||||
|
safe_lp = lp.dup.untaint
|
||||||
begin
|
begin
|
||||||
if File.symlink? safe_lp # for backword compatibility
|
if File.symlink? safe_lp # for backword compatibility
|
||||||
next
|
next
|
||||||
|
Loading…
x
Reference in New Issue
Block a user