diff options
author | Brad King <brad.king@kitware.com> | 2022-10-20 17:38:20 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-10-20 17:45:01 (GMT) |
commit | 79ce0f434e916684d734e136b92e14f472a9d14a (patch) | |
tree | 00a3bbb5989f0377f9393ddb22ddc1e21b0e3e43 /Tests/CMakeLists.txt | |
parent | 589aa449527fe2c9c4e296d154a2c7e90611f44b (diff) | |
download | CMake-79ce0f434e916684d734e136b92e14f472a9d14a.zip CMake-79ce0f434e916684d734e136b92e14f472a9d14a.tar.gz CMake-79ce0f434e916684d734e136b92e14f472a9d14a.tar.bz2 |
Tests: Explicitly allow usage of git file-based protocol in test cases
Due to CVE-2022-39253, Git 2.30.6 sets `protocol.file.allow=user` by
default. The change has also been backported to other Git versions by
distros. This breaks some of our test cases that use the file-based
protocol locally to simulate real workflows without requiring network
access. In these cases the file protocol is safe, so explicitly enable
it in the tests.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 24e98f4..3e400c2 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1574,6 +1574,7 @@ if(BUILD_TESTING) ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/ExternalProject") set_tests_properties(ExternalProject PROPERTIES + ENVIRONMENT GIT_ALLOW_PROTOCOL=file RUN_SERIAL 1 TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT}) @@ -2656,6 +2657,7 @@ if(BUILD_TESTING) -P "${CMake_BINARY_DIR}/Tests/CTestUpdateGIT.cmake" ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateGIT_DIR}") + set_property(TEST CTest.UpdateGIT PROPERTY ENVIRONMENT GIT_ALLOW_PROTOCOL=file) endif() # Test CTest Update with HG |