antixss怎么防止xss攻击

antixss怎么防止xss攻击

antixss防止xss攻击的方法:

antixss是由微软推出用于防止xss攻击的一个类库,可在将html数据保存到数据库之前,使用AntiXSS Sanitizer对象调用GetSafeHtml或GetSafeHtmlFragment,并且不要在保存数据之前对数据进行编码,因为AntiXss.GetSafeHtmlFragment(html)这个方法会替换掉html里的危险字符,以确保所有输出内容都经过html编码。了解更多antixss怎么防止xss攻击相关的解答,就上多想派(www.duoxiangpai.com)。

本文章由用户鲜淘网分享,版权归原作者,如侵犯,请联系(点这里联系),经核实,我们将第一时间删除。如若转载,请注明出处:https://www.duoxiangpai.com/64681.html

(0)

相关推荐