为什么要使用微软AntiXSS库? [英] Why use Microsoft AntiXSS library?

查看:133
本文介绍了为什么要使用微软AntiXSS库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当你可以简单地连接$ C C使用 HttpUtility.HtmlEn code 数据$,我们为什么要使用 AntiXss.HtmlEn $ C $ç

When you can simply encode the data using HttpUtility.HtmlEncode, why should we use AntiXss.HtmlEncode?

为什么是白名单比黑上市更好?

Why is white list approach better than black listing?

此外,在防XSS库,我在哪里指定白名单?

Also, in the Anti XSS library, where do I specify the whitelist?

推荐答案

白名单总是更安全的黑名单 - 只是觉得这将是更安全,让所有谁是的不是<人民的名单/ EM>让你的小队或只允许在那些谁。 (基本上黑名单只能处理攻击,这是显而易见的,或之前已使用)。

White lists are always more secure that blacklist - just think which will be more secure, having a list of all of the people who are not allowed to your party or only allowing in those who are. (Basically blacklists can only handle attacks which are obvious or have been used before).

这篇关于为什么要使用微软AntiXSS库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆