[java-idp-integration-tests] 01/02: Quote paths containing ( and ) in Tomcat setenv.sh

Tom Zeller tzeller at dragonacea.biz
Mon Jul 15 21:58:11 UTC 2024


This is an automated email from the git hooks/post-receive script.

tzeller pushed a commit to branch main
in repository java-idp-integration-tests.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-integration-tests.git;a=commit;h=98423127fb39db30d75aa180c78a88042433a15d

commit 98423127fb39db30d75aa180c78a88042433a15d
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Mon Jul 15 16:56:56 2024 -0500

    Quote paths containing ( and ) in Tomcat setenv.sh
---
 .../net/shibboleth/idp/integration/tests/BaseIntegrationTest.java   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/test/java/net/shibboleth/idp/integration/tests/BaseIntegrationTest.java b/src/test/java/net/shibboleth/idp/integration/tests/BaseIntegrationTest.java
index f62413c..cf13c74 100644
--- a/src/test/java/net/shibboleth/idp/integration/tests/BaseIntegrationTest.java
+++ b/src/test/java/net/shibboleth/idp/integration/tests/BaseIntegrationTest.java
@@ -596,7 +596,11 @@ public abstract class BaseIntegrationTest {
             final Path pathToSetenvBat = pathToTomcatBase.resolve(Paths.get("bin", "setenv.bat"));
             Assert.assertTrue(pathToSetenvBat.toAbsolutePath().toFile().exists(), "Path to setenv.bat not found");
             final String oldTextSetenvSh = "-Didp.home=/opt/shibboleth-idp";
-            final String newTextSetenvSh = "-Didp.home=" + Matcher.quoteReplacement(pathToIdPHome.toAbsolutePath().toString());
+            final String newTextSetenvSh = "-Didp.home="
+                    + Matcher.quoteReplacement(
+                            pathToIdPHome.toAbsolutePath().toString()
+                            .replaceAll("\\(", "\\\\(")
+                            .replaceAll("\\)", "\\\\)"));
             replaceFile(pathToSetenvSh, oldTextSetenvSh, newTextSetenvSh);
             replaceFile(pathToSetenvBat, oldTextSetenvSh, newTextSetenvSh);
         }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list