mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] filter dependency type and name strictly.
Co-authored-by: Yusuke Endoh <mame@ruby-lang.org>
92892bbc3a
This commit is contained in:
parent
0b65a7a19e
commit
1eb503373e
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue