默认情况下,当您执行 Response.Redirect 时,ASP.NET 会检查 HTTP 响应拆分攻击:
Response.Redirect("/MySite/Default.aspx?lang=foobar%0d%0aContentLength:%200%0d%0a%0d%0aHTTP/1.1%20200%20OK%0d%0aContentType:%20text/html%0d%0aContentLength:%2019%0d%0a%0d%0a<html>Shazam</html>");
结果 - 错误页面:
A potentially dangerous Request.QueryString value was detected from the client (lang="...th: 19
<html>Shazam</html>").
Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case.
有没有其他方法可以对默认的 ASP.NET 网站配置执行 HTTP 响应拆分攻击?ASP.NET MVC 呢?