A potentially dangerous Request.Form value was detected from the client

前端 未结 30 2269
刺人心
刺人心 2020-11-21 05:24

Every time a user posts something containing < or > in a page in my web application, I get this exception thrown.

I don\'t want to go

30条回答
  •  青春惊慌失措
    2020-11-21 06:00

    Disable the page validation if you really need the special characters like, >, , <, etc. Then ensure that when the user input is displayed, the data is HTML-encoded.

    There is a security vulnerability with the page validation, so it can be bypassed. Also the page validation shouldn't be solely relied on.

    See: http://web.archive.org/web/20080913071637/http://www.procheckup.com:80/PDFs/bypassing-dot-NET-ValidateRequest.pdf

提交回复
热议问题