asp.net mvc - Is it possible to restrict all MVC actions to HttpPost only? -
i asked apply [httppost] actions of 1 mvc project security reason says post more secure get, disagree with.
but anyway, possible so?
if is, <a href='somewhere'>click me</a> , scripts window.location='http:\\xxx.xxx\somewhere'? sent request right?
update
just informed it's high-priority issue of fortify report - ''asp.net mvc bad practices: controller action not restricted post".
in mvc first call make will/should of type httpget , in mvc default i.e if don't mention action of type httpget .
in case if want httget secure can use many methodoligies [authorize] attribute [requirehttps] , encode html etc .
public actionresult index() { return view(); } [httppost] public actionresult index(employee model) { //some logic return view(model); }
Comments
Post a Comment