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

XmlSerializer's SanitizeInput and DontWrapRawXml settings use same configuration key #6614

Closed
bruusi opened this issue Nov 30, 2022 · 2 comments · Fixed by #6615
Closed

XmlSerializer's SanitizeInput and DontWrapRawXml settings use same configuration key #6614

bruusi opened this issue Nov 30, 2022 · 2 comments · Fixed by #6615
Labels
Milestone

Comments

@bruusi
Copy link

bruusi commented Nov 30, 2022

This issue has been edited by Particular Software to provide additional context about the issue

Symptoms

Enabling one of the SanitizeInput or DontWrapRawXml settings will automatically enable both of these settings at once. See the raw XML properties documentation for further details about the behavior of the DontWrapRawXml configuration on message serialization.

Who's affected

You are affected if you are using the XML serializer and configure it with either the SanitizeInput() or DontWrapRawXml() setting. Note that the XML serializer is the default option if no other serializer is specified.

Root cause

The internal configuration used to track the state of the affected settings was incorrectly using the same configuration keys. Therefore, any configuration made to one of the related settings also impacted the other setting.

Backported to

Original issue content

    internal const string SkipWrappingRawXml = "XmlSerializer.SkipWrappingRawXml";
    internal const string SanitizeInput = "XmlSerializer.SkipWrappingRawXml";
@timbussmann
Copy link
Contributor

huh, good catch, that seems to be a mistake that completely slipped by.

Are you currently affected by this bug @bruusi ?

@timbussmann timbussmann reopened this Dec 1, 2022
@timbussmann timbussmann changed the title SanitizeInput constant string in XmlSerializer has same value as SkipWrappingRawXml XmlSerializer SanitizeInput and SkipWrappingRawXml settings use same configuration key Dec 2, 2022
@timbussmann timbussmann added this to the 8.0.2 milestone Dec 9, 2022
@timbussmann timbussmann changed the title XmlSerializer SanitizeInput and SkipWrappingRawXml settings use same configuration key XmlSerializer's SanitizeInput and DontWrapRawXml settings use same configuration key Dec 9, 2022
@timbussmann
Copy link
Contributor

Thanks for raising the issue @bruusi , we're going to release patch versions for 8.0, 7.7 and 7.8 shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants