Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML Variable Substitution changes "'" to "'" in customHeaders section #6814

Closed
phleebagg opened this issue Mar 27, 2018 · 7 comments
Closed
Assignees
Labels
Area: AzureAppService Label to monitor Azure App Service issues Area: Release

Comments

@phleebagg
Copy link

phleebagg commented Mar 27, 2018

[AGENT_MACHINENAME] --> [factoryvm-az391]
[AGENT_NAME] --> [Hosted Agent]
[AGENT_OS] --> [Windows_NT]
[AGENT_ID] --> [5]
[AGENT_VERSION] --> [2.131.0]

Task: Azure App Service Deploy
Version: 3.3.45

Before transform:
<add name="Content-Security-Policy" value="default-src 'self' 'unsafe-inline' 'unsafe-eval';"/>

After transform:
<add name="Content-Security-Policy" value="default-src &apos;self&apos; &apos;unsafe-inline&apos; &apos;unsafe-eval&apos;;"/>

Edit: Some further clarification:
The above element is in the system.webServers/customHeaders section, which is not accessible via variable substitution (which is fine and as expected).

My expectations were that there would be no modifications to the config beyond the variables being applied. The above changes to the Content-Security-Policy element causes the header to not be included in responses, which is unacceptable.

@vincent1173 vincent1173 added Area: Release Area: AzureAppService Label to monitor Azure App Service issues labels Mar 28, 2018
@vincent1173
Copy link
Contributor

vincent1173 commented Apr 3, 2018

@phleebagg , thanks for reporting the issue. This is a limitation we have in the substitution.
As a work-around, Can you try substituting the Content-Security-Policy with the same value default-src 'self' 'unsafe-inline' 'unsafe-eval'; ? In this way, the old value is retained.

@phleebagg
Copy link
Author

phleebagg commented Apr 3, 2018

I have tried doing so both with a Release scope variable and an environment-specific variable. Neither was applied, leaving the &apos; value.

@vincent1173
Copy link
Contributor

vincent1173 commented Apr 3, 2018

@phleebagg , To debug the issue, Can you please share the web.config file (mask the secrets) to [email protected] ?

@phleebagg
Copy link
Author

Files (web.config before and after substitution) sent.

@Ajay-MS Ajay-MS removed their assignment Apr 9, 2018
@vincent1173
Copy link
Contributor

@phleebagg , it's a genuine issue and we are currently working on the fix.
As a workaround, Can you please the substitution with XML transformation?

@phleebagg
Copy link
Author

The use of a config transform would probably work, however I am already using XML variable substitution for connection strings and other values at this time. I'll continue to use a manual edit post-release as a workaround for now.

@vincent1173
Copy link
Contributor

@phleebagg , the issue is fixed and the fix will be available in upcoming deployment (~3-4 weeks)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: AzureAppService Label to monitor Azure App Service issues Area: Release
Projects
None yet
Development

No branches or pull requests

4 participants