What is the way(best practice) to deal with XSS?

前端 未结 2 1989
太阳男子
太阳男子 2021-01-19 11:08

I am using ASP.NET and on ASP.NET page has validate attribute which checks for the XSS validations. However i would like to know that is it really sufficient ?

I hav

相关标签:
2条回答
  • 2021-01-19 11:56

    Check it out: Allowing HTML and Preventing XSS @ shiflett.org

    0 讨论(0)
  • 2021-01-19 12:05

    These are the basics:

    • Do not allow HTML input
    • Always html encode input when displaying it
    • Use the AntiXSSLibrary from Microsoft, or a similar library
    0 讨论(0)
提交回复
热议问题