Blame SOURCES/0001-Tests-Explicitly-allow-usage-of-git-file-based-proto.patch

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