Microsoft 防跨站点脚本库AntiXSS Library v4.2.1

简介:

AntiXSS 库目前处于版本 4.2.1,下载地址:http://www.microsoft.com/download/en/details.aspx?id=28589。它经历了一次非常棒的重新编写过程,并且就安全性而言,它提供了比 ASP.NET 附带的编码器更好的 HTML 编码器。 并不是说 Server.HtmlEncode 有什么问题,只是它侧重于兼容性而不是安全性。 AntiXSS 使用不同的方法进行编码。 有关详细信息,请访问 msdn.microsoft.com/security/aa973814。Jon Galloway 在 http://weblogs.asp.net/jgalloway/archive/2011/04/28/using-antixss-4-1-beta-as-the-default-encoder-in-asp-net.aspx 中发布了有关此内容的精彩文章。

This release addresses a vulnerability in the HTML Sanitizer, MS12-007 http://technet.microsoft.com/en-us/security/bulletin/ms12-007 and adds full support for .NET 4.0 as well as restoring support for .NET 2.0.
The sanitizer has been changed to remove all CSS it encounters, this new behaviour means that if you were keeping CSS formatting from HTML that is no longer going to be the case.
In addition to the change necessary to correct the vulnerability there are a few new features;

Minimum Requirements.
You can now, once again, use the encoder libraries with .NET 2.0. The installer will create directories for each framework version supported, .NET 2.0, .NET 3.5 and .NET 4.0 which contain an optimized version of the encoders for that platform.
Invalid Unicode no longer throws an exception.
Invalid Unicode characters are now replaced with the Unicode replacement character, U+FFFD (�). Previously, when encoding strings through HtmlEncode, HtmlAttributeEncode, XmlEncode, XmlAttributeEncode or CssEncode invalid Unicode characters would be detected and an exception thrown.
UrlPathEncode added.
The encoding library now has UrlPathEncode which will encode a string for use as the path part of a URL.
.NET 4.0 encoder support.
There’s finally an official way to swap AntiXSS into the framework. If you are using .NET 4.0 ensure you are using the .NET 4.0 version of the encoding library and then edit your web.config and add the encoderType attribute to the httpRuntime element; i.e.

本文来自云栖社区合作伙伴“doNET跨平台”,了解相关信息可以关注“opendotnet”微信公众号

目录
相关文章
|
SQL 数据库
Microsoft SQL Server 2000数据还原
Microsoft SQL Server 2000还原数据操作流程 1、开始 - 所有程序 - Microsoft SQL Server - 企业管理器(如图1-1)。
1053 0
|
SQL 数据库
Microsoft SQL Server 2000数据附加
Microsoft SQL Server 2000附加数据操作流程 1、开始 - 所有程序 - Microsoft SQL Server - 企业管理器(如图1-1)。
1057 0
|
SQL 数据库 Windows
Microsoft SQL Server 2008数据还原
Microsoft SQL Server 2008还原数据操作流程 1、开始 - 所有程序 - Microsoft SQL Server 2008 R2 - SQL Server Management Studio(如图1-1)。
1070 0
|
SQL 数据库 Windows
Microsoft SQL Server 2000数据库备份
Microsoft SQL Server 2000备份数据操作流程 1、开始 - 所有程序 - Microsoft SQL Server - 企业管理器(如图1-1)。
1181 0
|
SQL 监控 数据库
Microsoft SQL Server 2008清理LDF日志
Microsoft SQL Server 2008 LDF数据文件清理方法。 PS:由于该操作涉及数据库中的数据,请在操作前先做好数据备份。 准备:Microsoft SQL Server 2008清理LDF脚本,请点击下载获取。
1626 0
|
SQL 数据库 Windows
Microsoft SQL Server 2008修改混合模式
数据库身份验证SQL Server和Windows设置 1、开始 - 所有程序 - Microsoft SQL Server 2008 R2 - SQL Server Management Studio(如图1-1) 图 1-1 2、进入后会弹出窗口【连接到服务器】,在【身份验证】选择中【Windows身份验证】— 点击【连接】(如图1-2) 图 1-2 3、在数据库服务实例名(如图1-3,WIN-VQ5SKTLJ9EU\sql位置)点击鼠标右键【属性】。
1149 0
|
SQL 数据库 数据安全/隐私保护
Microsoft SQL Server 2008修改sa密码
数据库sa密码忘记处理方案 1、开始 - 所有程序 - Microsoft SQL Server 2008 R2 - 点击SQL Server Management Studio(如图1-1)。
1475 0
|
SQL 数据库 数据安全/隐私保护
Microsoft SQL Server 2000修改sa密码提示错误:2812
报错提示:错误 2812:未能找到存储过程 ‘ sp_password ’。 准备:存储过程修复脚本,请点击下载获取。下载完毕后,请放置C盘根目录并解压。
1062 0
|
SQL 数据库 Windows
Microsoft SQL Server 2000修改混合模式
数据库身份验证SQL Server和Windows设置 1、开始—所有程序—Microsoft SQL Server—企业管理器,进入Microsoft SQL Server 2000数据库中(如图1-1)。
1146 0
|
SQL 数据库 Windows
Microsoft SQL Server 2000收缩MDF数据
Microsoft SQL Server 2000 MDF数据文件清理方法。 PS:由于该操作涉及数据库中的数据,请在操作前先做好数据备份。 准备:Microsoft SQL Server 2000收缩MDF脚本,请点击下载获取。
1094 0