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.
dotnet/aspnetcore#23578 dotnet/aspnetcore#24264
Decoding arbitrary input allows spoofing of special inputs like __Host- with encoded values like __%48ost-.
Fix: Only compare to known values. e.g. the key the developer passes in with the encoding we would have used.
This fix works seamlessly for the indexer but leaves the encoded value in enumerator.
Note Katana does not have quirks or AppContext switches. That should be OK because Katana is not bundled as part of a framework, it's an opt-in package upgrade.
This PR had to do a little more more work than the AspNetCore 2.1 version because Katana shared the same parser for cookies, forms, and query strings. The three are close, but there are a few differences people have complained about (aspnet/HttpAbstractions#547). AspNetCore changed to using a separate parser for each data type a long time ago.
TODO: versioning. This will probably be versioned as 4.1.1.