aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-10-26 15:53:41 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-10-27 16:38:48 +0100
commitc90d57497b9bcd237c3ae810ee8edb5b0d2d575a (patch)
treee6bc7c069e0e6705346b1601ed73480991912a10
parent6603c3e39f1cf746669ec6c9f0be8c6e6ece426e (diff)
downloadbitbake-c90d57497b9bcd237c3ae810ee8edb5b0d2d575a.tar.gz
tests/fetch: Allow handling of a file:// url within a submoduleyocto-4.0.52022-04.5-kirkstone2.0.5
CVE-2022-39253 in git meant file:// urls within submodules were disabled. Add a parameter to the commands in the tests to allow this to continue to work. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/tests/fetch.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py
index 1152e89c0..7bace415d 100644
--- a/lib/bb/tests/fetch.py
+++ b/lib/bb/tests/fetch.py
@@ -1834,7 +1834,7 @@ class GitShallowTest(FetcherTest):
self.add_empty_file('bsub', cwd=smdir)
self.git('submodule init', cwd=self.srcdir)
- self.git('submodule add file://%s' % smdir, cwd=self.srcdir)
+ self.git('-c protocol.file.allow=always submodule add file://%s' % smdir, cwd=self.srcdir)
self.git('submodule update', cwd=self.srcdir)
self.git('commit -m submodule -a', cwd=self.srcdir)
@@ -1864,7 +1864,7 @@ class GitShallowTest(FetcherTest):
self.add_empty_file('bsub', cwd=smdir)
self.git('submodule init', cwd=self.srcdir)
- self.git('submodule add file://%s' % smdir, cwd=self.srcdir)
+ self.git('-c protocol.file.allow=always submodule add file://%s' % smdir, cwd=self.srcdir)
self.git('submodule update', cwd=self.srcdir)
self.git('commit -m submodule -a', cwd=self.srcdir)