mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
[rubygems/rubygems] github source should default to secure protocol
Bundler 2 switched to secure https herec2e81f8ff6
Insecure protocols should be avoided to prevent MITM attacks.758413364a
This commit is contained in:
parent
adfbee85e0
commit
ceeefb5870
Notes:
git
2025-04-09 13:49:37 +00:00
2 changed files with 3 additions and 3 deletions
|
@ -214,7 +214,7 @@ class Gem::RequestSet::GemDependencyAPI
|
||||||
git_source :github do |repo_name|
|
git_source :github do |repo_name|
|
||||||
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include? "/"
|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include? "/"
|
||||||
|
|
||||||
"git://github.com/#{repo_name}.git"
|
"https://github.com/#{repo_name}.git"
|
||||||
end
|
end
|
||||||
|
|
||||||
git_source :bitbucket do |repo_name|
|
git_source :bitbucket do |repo_name|
|
||||||
|
|
|
@ -183,7 +183,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
||||||
|
|
||||||
assert_equal [dep("a")], @set.dependencies
|
assert_equal [dep("a")], @set.dependencies
|
||||||
|
|
||||||
assert_equal %w[git://github.com/example/repository.git master],
|
assert_equal %w[https://github.com/example/repository.git master],
|
||||||
@git_set.repositories["a"]
|
@git_set.repositories["a"]
|
||||||
|
|
||||||
expected = { "a" => Gem::Requirement.create("!") }
|
expected = { "a" => Gem::Requirement.create("!") }
|
||||||
|
@ -196,7 +196,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
||||||
|
|
||||||
assert_equal [dep("a")], @set.dependencies
|
assert_equal [dep("a")], @set.dependencies
|
||||||
|
|
||||||
assert_equal %w[git://github.com/example/example.git master],
|
assert_equal %w[https://github.com/example/example.git master],
|
||||||
@git_set.repositories["a"]
|
@git_set.repositories["a"]
|
||||||
|
|
||||||
expected = { "a" => Gem::Requirement.create("!") }
|
expected = { "a" => Gem::Requirement.create("!") }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue