StackExchange.DataExplorer icon indicating copy to clipboard operation
StackExchange.DataExplorer copied to clipboard

Source ParsedQuery key/value pairs from QueryString + Form instead of all Request.Params

Open tms opened this issue 3 years ago • 0 comments

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 from Request.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 use Request.QueryString or Request.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.

tms avatar Jan 08 '23 22:01 tms