QueryString key is not unescaped when value omitted #33394
Labels
area-networking
Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
bug
This issue describes a behavior which is not expected - a bug.
good first issue
Good for newcomers.
help wanted
Up for grabs. We would accept a PR to help resolve this issue
Milestone
An incoming request with a query string that contains an escaped key without a value is not properly unescaped.
Example:
In contrast, when the query string does contain a value, it gets unescaped properly.
This bug applies to ASP.NET Core version: 3.1, 5.0 and the master branch.
The problem is caused by the next line:
aspnetcore/src/Http/WebUtilities/src/QueryHelpers.cs
Line 221 in 52eff90
which does not unescape. To fix, replace this line with:
When this gets fixed, it would be great to also backport it to .NET Core 3.1 and 5.0.
The text was updated successfully, but these errors were encountered: