From 2073d7b8d903e56a4cabf6e820a0327a198cff20 Mon Sep 17 00:00:00 2001 From: Lee Fine <50836957+leefine02@users.noreply.github.com> Date: Wed, 31 Aug 2022 15:20:04 -0400 Subject: [PATCH] Escape double quotes (#46) --- CHANGELOG.md | 1 + JavaKeyStoreSSH/RemoteHandlers/WinRMHandler.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2baf7c..6b7c598 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ v2.5 - Bug fixes for installation on Linux hosted Universal Orchestrator +- Bug fix for handling embedded double quotes in alias on Windows servers (2.5.1) v2.4 - Add new config.json setting DefaultLinuxPermissionsOnStoreCreation, and certificate store type custom parameter linuxFilePermissionsOnStoreCreation diff --git a/JavaKeyStoreSSH/RemoteHandlers/WinRMHandler.cs b/JavaKeyStoreSSH/RemoteHandlers/WinRMHandler.cs index bb75b3b..a667294 100644 --- a/JavaKeyStoreSSH/RemoteHandlers/WinRMHandler.cs +++ b/JavaKeyStoreSSH/RemoteHandlers/WinRMHandler.cs @@ -73,7 +73,7 @@ public override string RunCommand(string commandText, object[] parameters, bool if (commandText.ToLower().IndexOf("keytool ") > -1) { - commandText = ($"& '{commandText}").Replace("keytool", "keytool'"); + commandText = ($"& '{commandText}").Replace("keytool", "keytool'").Replace(@"""",@"\"""); commandText = "echo '' | " + commandText; } ps.AddScript(commandText);