Mark bytes as consumed #13394
Merged
mmitche merged 1 commit intorelease/3.0-preview9from Aug 24, 2019
Merged
Conversation
Contributor
|
This looks ready but we need an approver (beyond QB-approval, which this has) |
Member
|
Can we get this reviewed and checked in so we can get a build for Sunday night validation? |
BrennanConroy
approved these changes
Aug 24, 2019
| } | ||
|
|
||
| [Fact] | ||
| public void TryParseFormValues_MultiSegmentFastPathWorks() |
Member
There was a problem hiding this comment.
I'm assuming this would have failed before the fix?
Member
Author
There was a problem hiding this comment.
Right, this covers the repro scenario.
jkotalik
approved these changes
Aug 24, 2019
Member
Author
|
@JunTaoLuo @Pilchie admin merge please. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#13372 @Pilchie
This looks like a preview9 regression from #12749 where we refactored the form parser. It's externally reported as impacting OpenIdConnect auth, but I was only able to reproduce it using WsFed auth. The request fails and the client is unable to log in. I don't see any immediate workarounds.
The issue happens if the form is long enough to take the slow path (multiple buffer segments), but the last key=value pair is short and takes the single segment fast path. In that case it fails to mark the last bytes as consumed and the parser mistakenly aborts.
Compare the fix to what happens in the slow path on lines 294 and 295 bellow.