Source ParsedQuery key/value pairs from QueryString + Form instead of all Request.Params #123
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.
I unfortunately don't have Data Explorer set up to verify these changes at the immediate moment, but as uncovered by this Meta post, we seed the variable substitution for
ParsedQuery
with the key/value pairs fromRequest.Params
.Request.Params
"gets a combined collection of QueryString, Form, Cookies, and ServerVariables items", which inadvertently makes it possible to dump cookie or IIS server variable values (in the case of the Meta post, it's a conflict with the server variable "url"). Not ideal!This change puts the user supplied parameters we care about into a single property that we can then pass into
ParsedQuery
in various places. It's likely also possible to just useRequest.QueryString
orRequest.Form
as appropriate, but I felt less confident in that change since the current behaviour would mask if we had a route that allowed you to use both.