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
scripts or programs launched by health checks that require double quoted parameters are receiving the backslash character for escaped double quotes. \"
Expected Behavior
The script or program should receive a double quote with no backslash
Steps to reproduce
I have a health check that executes a batch file which needs a double quoted parameter. In order to create valid json I have to use backslashs to escape the double quotes.
{
"check": {
"script": "C:\\Program^ Files\\consul\\conf.d\\test.bat \"check-freespace.ps1\"\"-drive c\"",
"interval": "10s",
"name": "Check Freespace on System Drive40"
}
}
Unexpectedly the batch file is receiving the backslash. \"check-freespace.ps1\"
when it should be receiving "check-freespace.ps1"
For a batch file I can easily remove the extra characters but for commands like: "script": "PowerShell -File \"some file with a space in the name\""
Its a bit more difficult.
Versions Affected
0.6.x, 0.5.2
I tried all of the 6.x versions in both 32 and 64 bit as well as version 0.5.2 and they were all affected.
Platforms Affected
I believe this is a windows only issue as I was not able to recreated it on CentOS or Ubuntu
The text was updated successfully, but these errors were encountered:
Consul Version
0.6.4
Platform
Windows Server 2012 R2 64-Bit
Actual Behavior
scripts or programs launched by health checks that require double quoted parameters are receiving the backslash character for escaped double quotes.
\"
Expected Behavior
The script or program should receive a double quote with no backslash
Steps to reproduce
I have a health check that executes a batch file which needs a double quoted parameter. In order to create valid json I have to use backslashs to escape the double quotes.
Unexpectedly the batch file is receiving the backslash.
\"check-freespace.ps1\"
when it should be receiving
"check-freespace.ps1"
For a batch file I can easily remove the extra characters but for commands like:
"script": "PowerShell -File \"some file with a space in the name\""
Its a bit more difficult.
Versions Affected
0.6.x, 0.5.2
I tried all of the 6.x versions in both 32 and 64 bit as well as version 0.5.2 and they were all affected.
Platforms Affected
I believe this is a windows only issue as I was not able to recreated it on CentOS or Ubuntu
The text was updated successfully, but these errors were encountered: