|
|
37b6c0 |
From f72734ff7712d6aae837f940a45d6e7508bb182c Mon Sep 17 00:00:00 2001
|
|
|
37b6c0 |
From: Brad King <brad.king@kitware.com>
|
|
|
37b6c0 |
Date: Thu, 20 Oct 2022 13:38:20 -0400
|
|
|
37b6c0 |
Subject: [PATCH] Tests: Explicitly allow usage of git file-based protocol in
|
|
|
37b6c0 |
test cases
|
|
|
37b6c0 |
|
|
|
37b6c0 |
Due to CVE-2022-39253, Git 2.30.6 sets `protocol.file.allow=user` by
|
|
|
37b6c0 |
default. The change has also been backported to other Git versions by
|
|
|
37b6c0 |
distros. This breaks some of our test cases that use the file-based
|
|
|
37b6c0 |
protocol locally to simulate real workflows without requiring network
|
|
|
37b6c0 |
access. In these cases the file protocol is safe, so explicitly enable
|
|
|
37b6c0 |
it in the tests.
|
|
|
37b6c0 |
|
|
|
37b6c0 |
(cherry picked from commit 79ce0f434e916684d734e136b92e14f472a9d14a)
|
|
|
37b6c0 |
---
|
|
|
37b6c0 |
Tests/CMakeLists.txt | 2 ++
|
|
|
37b6c0 |
1 file changed, 2 insertions(+)
|
|
|
37b6c0 |
|
|
|
37b6c0 |
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
|
|
|
37b6c0 |
index 8e7c04fbd0..d011020f99 100644
|
|
|
37b6c0 |
--- a/Tests/CMakeLists.txt
|
|
|
37b6c0 |
+++ b/Tests/CMakeLists.txt
|
|
|
37b6c0 |
@@ -1540,6 +1540,7 @@ if(BUILD_TESTING)
|
|
|
37b6c0 |
)
|
|
|
37b6c0 |
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/ExternalProject")
|
|
|
37b6c0 |
set_tests_properties(ExternalProject PROPERTIES
|
|
|
37b6c0 |
+ ENVIRONMENT GIT_ALLOW_PROTOCOL=file
|
|
|
37b6c0 |
RUN_SERIAL 1
|
|
|
37b6c0 |
TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT})
|
|
|
37b6c0 |
|
|
|
37b6c0 |
@@ -2653,6 +2654,7 @@ if(BUILD_TESTING)
|
|
|
37b6c0 |
-P "${CMake_BINARY_DIR}/Tests/CTestUpdateGIT.cmake"
|
|
|
37b6c0 |
)
|
|
|
37b6c0 |
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateGIT_DIR}")
|
|
|
37b6c0 |
+ set_property(TEST CTest.UpdateGIT PROPERTY ENVIRONMENT GIT_ALLOW_PROTOCOL=file)
|
|
|
37b6c0 |
endif()
|
|
|
37b6c0 |
|
|
|
37b6c0 |
# Test CTest Update with HG
|
|
|
37b6c0 |
--
|
|
|
37b6c0 |
2.31.1
|
|
|
37b6c0 |
|