You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Note double underscore is escaped by the comment parser]
In create-vmfleet.ps1 line 163 CONNECTPASS is replaced with the raw password provided in parameter $connectpass without being escaped. This means if the password includes a character such as " the launch script inside the vm will not run due to syntax error. Proposed patch below (rough draft doesnt escape everything like ' )
The text was updated successfully, but these errors were encountered:
JosiahBradley
changed the title
$Connectpass not escaped preventing launch script from running when special characters are included in the password.
[VMFleet] $Connectpass not escaped preventing launch script from running when special characters are included in the password.
Apr 4, 2018
This is a patch for Issue 60: microsoft#60
When using a password that replaces __CONNECTPASS__ that has special characters such as ',",* the command on line 36 no longer causes a syntax error.
[Note double underscore is escaped by the comment parser]
In create-vmfleet.ps1 line 163 CONNECTPASS is replaced with the raw password provided in parameter $connectpass without being escaped. This means if the password includes a character such as " the launch script inside the vm will not run due to syntax error. Proposed patch below (rough draft doesnt escape everything like ' )
$escapedpassword = "'" + $using:connectpass + "'"
gc C:\ClusterStorage\collect\control\launch-template.ps1 |% { $_ -replace 'CONNECTUSER',$using:connectuser -replace 'CONNECTPASS',$escapedpassword } > z:\users\administrator\launch.ps1
The text was updated successfully, but these errors were encountered: