From 1dd081d8665134bcb9636d2b49efce0fded4a08c Mon Sep 17 00:00:00 2001 From: Shawn Neal Date: Thu, 24 Apr 2014 08:03:05 -0700 Subject: [PATCH] Don't use interpolated strings for username and password Its possible that usernames and passwords may contain special characters like $ --- plugins/communicators/winrm/scripts/elevated_shell.ps1.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/communicators/winrm/scripts/elevated_shell.ps1.erb b/plugins/communicators/winrm/scripts/elevated_shell.ps1.erb index 8e48a219e..97c5f822a 100644 --- a/plugins/communicators/winrm/scripts/elevated_shell.ps1.erb +++ b/plugins/communicators/winrm/scripts/elevated_shell.ps1.erb @@ -1,6 +1,6 @@ $command = "<%= options[:command] %>" -$user = "<%= options[:username] %>" -$password = "<%= options[:password] %>" +$user = '<%= options[:username] %>' +$password = '<%= options[:password] %>' $task_name = "WinRM_Elevated_Shell" $out_file = "$env:SystemRoot\Temp\WinRM_Elevated_Shell.log"