Skip to content

Commit 4f1e0bf

Browse files
committed
Followed up CVE-2022-39253 for bundler examples
1 parent 0a43a04 commit 4f1e0bf

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

spec/bundler/cache/git_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@
156156
end
157157

158158
it "copies repository to vendor cache, including submodules" do
159+
# CVE-2022-39253: https://lore.kernel.org/lkml/xmqq4jw1uku5.fsf@gitster.g/
160+
system(*%W[git config --global protocol.file.allow always])
161+
159162
build_git "submodule", "1.0"
160163

161164
git = build_git "has_submodule", "1.0" do |s|

spec/bundler/install/gemfile/git_spec.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,9 @@
865865
end
866866

867867
it "ignores submodules if :submodule is not passed" do
868+
# CVE-2022-39253: https://lore.kernel.org/lkml/xmqq4jw1uku5.fsf@gitster.g/
869+
system(*%W[git config --global protocol.file.allow always])
870+
868871
build_git "submodule", "1.0"
869872
build_git "has_submodule", "1.0" do |s|
870873
s.add_dependency "submodule"
@@ -884,6 +887,9 @@
884887
end
885888

886889
it "handles repos with submodules" do
890+
# CVE-2022-39253: https://lore.kernel.org/lkml/xmqq4jw1uku5.fsf@gitster.g/
891+
system(*%W[git config --global protocol.file.allow always])
892+
887893
build_git "submodule", "1.0"
888894
build_git "has_submodule", "1.0" do |s|
889895
s.add_dependency "submodule"
@@ -902,6 +908,9 @@
902908
end
903909

904910
it "does not warn when deiniting submodules" do
911+
# CVE-2022-39253: https://lore.kernel.org/lkml/xmqq4jw1uku5.fsf@gitster.g/
912+
system(*%W[git config --global protocol.file.allow always])
913+
905914
build_git "submodule", "1.0"
906915
build_git "has_submodule", "1.0"
907916

spec/bundler/update/git_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@
124124

125125
describe "with submodules" do
126126
before :each do
127+
# CVE-2022-39253: https://lore.kernel.org/lkml/xmqq4jw1uku5.fsf@gitster.g/
128+
system(*%W[git config --global protocol.file.allow always])
129+
127130
build_repo4 do
128131
build_gem "submodule" do |s|
129132
s.write "lib/submodule.rb", "puts 'GEM'"

0 commit comments

Comments
 (0)