ASP.NET MVC UpdateModel vulnerable to hacking?

前端 未结 5 1781
不知归路
不知归路 2020-12-15 13:51

I have an ASP.NET MVC application that is calendar-like. As per the NerdDinner example, I\'m updating the results of my edit page using UpdateMethod()

In my app, cer

5条回答
  •  悲哀的现实
    2020-12-15 14:34

    Your fears are right. This is called mass assignment. You can protect your code by marking your class with BindAttribute and setting Exclude / Include properties.

提交回复
热议问题