May*_*ami -1 c# security request fortify
嗨,大家好
private const string abc="__abc";
private const string abcd="__abcd";
pageLoad()
{
this.xyz();
}
xyz()
{
if postback()
{
}
else
{
string k1=this.Request[abc];//some 'value shadowing error is shown here by my tool . This makes it
Run Code Online (Sandbox Code Playgroud)
不安全且容易受到用户编辑的影响。string k2=this.Request[abcd];// } }
I want to resolve this issue but I am unsure about where to begin?
- List item
Run Code Online (Sandbox Code Playgroud)简而言之:在 ASP.NET 的上下文中,这意味着用户可以传入应该是的表单字段作为查询字符串参数。修复而不是去
Request["xyz"]
Run Code Online (Sandbox Code Playgroud)
你走
Request.Form["xyz"]
Run Code Online (Sandbox Code Playgroud)
你可以在这里阅读更多https://www.jardinesoftware.net/2011/06/07/asp-net-value-shadowing/