什么是价值阴影?

时间:2015-07-04 09:57:20

标签: c# security request fortify

  1. 大家好

            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
    

    不安全且容易受到用户编辑的攻击。             string k2 = this.Request [abcd]; //             }             }

        I want to resolve this issue but I am unsure about where to begin?
    
         - List item
    

1 个答案:

答案 0 :(得分:4)

简短回答: 在ASP.NET的上下文中,它意味着用户可以传递应该让表单字段作为查询字符串参数。 修复而不是去

Request["xyz"]
你去了

Request.Form["xyz"]

您可以在此处阅读更多内容https://www.jardinesoftware.net/2011/06/07/asp-net-value-shadowing/

相关问题