summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornagachika <nagachika@ruby-lang.org>2022-10-20 20:30:06 +0900
committernagachika <nagachika@ruby-lang.org>2022-10-20 20:30:06 +0900
commitfbf4bec4bcb39a6f1c4a0d0008876c6ec813c2ce (patch)
treea15cb07225a8785e01a8384a9e08504cabd64a1c /test
parent1db6249c66291ad2464f89768d24d850dbf98901 (diff)
merge revision(s) dae843f6b7502f921a7e66f39e3714a39d860181,86096a91d55f72620e0f8ca8634da5fa342dc35b:
Bypass git submodule add/update with git config protocol.file.allow=always option. Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> --- test/rubygems/test_gem_source_git.rb | 5 +++++ 1 file changed, 5 insertions(+) [rubygems/rubygems] Use [] instead of double-quotes --- test/rubygems/test_gem_source_git.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Diffstat (limited to 'test')
-rw-r--r--test/rubygems/test_gem_source_git.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_source_git.rb b/test/rubygems/test_gem_source_git.rb
index 5702da0597..147c6df1d2 100644
--- a/test/rubygems/test_gem_source_git.rb
+++ b/test/rubygems/test_gem_source_git.rb
@@ -63,6 +63,11 @@ class TestGemSourceGit < Gem::TestCase
end
def test_checkout_submodules
+ # We need to allow to checkout submodules with file:// protocol
+ # CVE-2022-39253
+ # https://lore.kernel.org/lkml/xmqq4jw1uku5.fsf@gitster.g/
+ system(@git, *%W[config --global protocol.file.allow always])
+
source = Gem::Source::Git.new @name, @repository, "master", true
git_gem "b"