Skip to content

Conversation

@SilentCC
Copy link
Contributor

It is possible for enum identifiers to contain commas in IL.

Use reflection to check whethe enum value contains specifical character ( chars except digit, letter and underscore). Fail early, before pass bogus tokens into the naming policy.

closes #73712

@ghost ghost added community-contribution Indicates that the PR has been added by a community member area-System.Text.Json labels Oct 11, 2022
@dnfadmin
Copy link

dnfadmin commented Oct 11, 2022

CLA assistant check
All CLA requirements met.

@ghost
Copy link

ghost commented Oct 11, 2022

Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis
See info in area-owners.md if you want to be subscribed.

Issue Details

It is possible for enum identifiers to contain commas in IL.

Use reflection to check whethe enum value contains specifical character ( chars except digit, letter and underscore). Fail early, before pass bogus tokens into the naming policy.

closes #73712

Author: SilentCC
Assignees: -
Labels:

area-System.Text.Json, community-contribution

Milestone: -

@build-analysis build-analysis bot mentioned this pull request Oct 11, 2022
2 tasks
Copy link
Member

@eiriktsarpalis eiriktsarpalis left a comment

Choose a reason for hiding this comment

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

Thank you!

@eiriktsarpalis
Copy link
Member

CI test failures are flagged as known issues.

@eiriktsarpalis eiriktsarpalis merged commit 129982e into dotnet:main Oct 26, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Nov 25, 2022
@eiriktsarpalis eiriktsarpalis added this to the 8.0.0 milestone Jan 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Text.Json community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider failing early when (de)serializing enum values that contain commas

4 participants