[rubygems/rubygems] filter dependency type and name strictly.
Co-authored-by: Yusuke Endoh <mame@ruby-lang.org> https://github.com/rubygems/rubygems/commit/92892bbc3a
This commit is contained in:
parent
0b65a7a19e
commit
1eb503373e
@ -754,7 +754,11 @@ class Gem::Installer
|
||||
raise Gem::InstallError, "#{spec} has an invalid specification_version"
|
||||
end
|
||||
|
||||
if spec.dependencies.any? {|dep| dep.type =~ /\R/ || dep.name =~ /\R/ }
|
||||
if spec.dependencies.any? {|dep| dep.type != :runtime && dep.type != :development }
|
||||
raise Gem::InstallError, "#{spec} has an invalid dependencies"
|
||||
end
|
||||
|
||||
if spec.dependencies.any? {|dep| dep.name =~ /(?:\R|[<>])/ }
|
||||
raise Gem::InstallError, "#{spec} has an invalid dependencies"
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user