Closed jhkimnew closed 4 years ago
Here is one example case which shows why we handles the single/double quotation marks. The problem exists on the value=''' because the single quotation mark (') was not escaped with an additional single quotation mark such as value=''''. We should investigate if other special characters can cause the same issue such as +, /, [, ].
C:\WINDOWS\system32\inetsrv\appcmd.exe set config -section:system.applicationHost/applicationPools /+"[name='DefaultAppPool'].environmentVariables.[name='DefaultAppPool'].environmentVariables.[name='foo',value=''']" /commit:apphost
@sujitnayak FYI, I have verified that there is no issue with other special characters. Only single or double quotation mark characters is problematic and we have already fixed the issue. So, we don't need to create any new function. I am closing this issue.
We should investigate how AppCmd.exe handles special characters. Currently we handles only single/double quotation marks, which might not be enough.