Security with QueryString values in Asp.net MVC

前端 未结 7 1157
迷失自我
迷失自我 2020-12-10 08:30

How do you properly ensure that a user isnt tampering with querystring values or action url values? For example, you might have a Delete Comment action on your CommentContro

7条回答
  •  不思量自难忘°
    2020-12-10 09:07

    You cannot easily do this.

    I have fond memories of a site that used action urls to do deletes.

    All was good until they started search crawling the intranet.

    Ooops, goodbye data.

    I would recommend a solution whereby you do not use querystrings for anything you do not wish to be edited.

提交回复
热议问题