mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user