Preventing Url manipulation attacks with MVC?

前端 未结 4 1688
难免孤独
难免孤独 2021-02-04 12:00

Any good strategies, code snippets etc for preventing URL manipulation?

For example I have this url, http://localhost/profile/edit/5 the id could easily be

4条回答
  •  無奈伤痛
    2021-02-04 12:37

    The url used to access your site is data from the client, and when security is concerned, you should always consider client provided data hostile.

    Unfortunately there are no silver bullets to deal with this problem. You'll need to implement access restrictions throughout the application.

提交回复
热议问题