-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Fix form pipe parser #12749
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
Fix form pipe parser #12749
Conversation
Perf numbers? |
Before:
After:
LGTM |
...ities/perf/Microsoft.AspNetCore.WebUtilities.Performance/FormPipeReaderInternalsBenchmark.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'd wait on @jkotalik's approval though
If we're taking this for Ask-Mode, needs the template and label. Otherwise it needs to be on |
@anurse added the template. Suggested for preview9 because we've had direct customer reports of the regression impacting their apps. |
Sounds good. Meets the bar IMO, we'll confirm tomorrow. |
Tactics approved |
Description
#12381
Issue 1) Keys without values were being merged "key1&key2=value2"
Issue 2) Keys without values at the end of a form being dropped (2.2) or throwing (3.0) "key1=value1&key2".
Customer Impact
Externally posted forms were being mis-parsed in some situations.
Regression?
Yes, in 2.2 un-parsed trailing data would be discarded, but in 3.0 it throws.
Risk
Low, we have good unit test coverage here.
Old algorithm: Look for "=", then "&".
New algorithm: Look for "&", then see if it has an optional "="