开发者

Post to Get method Conversion Vulnerability in ASP.net application

开发者 https://www.devze.com 2023-03-23 04:54 出处:网络
How can an Asp.Net web application be prevented from accepting Post to Get method conversion. More precisely, how can \'GET\' requests be rejected where a \'POST\' data is expected.

How can an Asp.Net web application be prevented from accepting Post to Get method conversion. More precisely, how can 'GET' requests be rejected where a 'POST' data is expected. I will greatly appreciate clarification on how this VULNERABI开发者_如何学GoLITY occurs and how it can be prevented. Thanks.


Generally speaking you can check for a POST by doing Page.IsPostBack in web forms: http://msdn.microsoft.com/en-us/library/system.web.ui.page.ispostback.aspx

If you're talking MVC, you generally just set the [HttpPost] attribute: http://msdn.microsoft.com/en-us/library/system.web.mvc.httppostattribute.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消