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

Ban XmlReader overloads that take string #9076

Merged
merged 7 commits into from Aug 2, 2023

Conversation

rainersigwald
Copy link
Member

These overloads create a URI from the string and can cause problems with
GB18030 certification, because that URI gets normalized in a way that
doesn't work with all characters. We should instead pass a stream
created from the file, as in #8931 and #9028.

Formalize that rule for the whole repo.

rainersigwald and others added 3 commits July 26, 2023 13:19
These overloads create a URI from the string and can cause problems with
GB18030 certification, because that URI gets normalized in a way that
doesn't work with all characters. We should instead pass a stream
created from the file, as in dotnet#8931 and dotnet#9028.

Formalize that rule for the whole repo.
Copy link
Member

@JanKrivanek JanKrivanek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

But as we are at tiying up the XmlReader.Create calls - let's have them all properly disposed

src/Tasks/XamlTaskFactory/RelationsParser.cs Outdated Show resolved Hide resolved
src/Tasks/XamlTaskFactory/RelationsParser.cs Outdated Show resolved Hide resolved
src/Tasks/GenerateResource.cs Outdated Show resolved Hide resolved
Copy link
Member

@JanKrivanek JanKrivanek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

Co-authored-by: Rainer Sigwald <raines@microsoft.com>
Copy link
Member Author

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (but I created the PR so can't vote)

@YuliiaKovalova
Copy link
Member

LGTM (but I created the PR so can't vote)

...but I can ;)

@YuliiaKovalova YuliiaKovalova merged commit 1e5ce5f into dotnet:main Aug 2, 2023
8 checks passed
@rainersigwald rainersigwald deleted the ban-xmlreader branch January 23, 2024 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants