javascript - Request Validation ASP.NET MVC -
i've been searching day , i'm pretty confused preventing script being submitted in mvc application. of finding telling me how disable request validation, not want.
in web.config in views folder states
enabling request validation in view pages cause validation occur after input has been processed controller. default mvc performs request validation before controller processes input. change behaviour apply validateinputattribute controller or action.
that makes sound mvc app should throw 'potentially dangerous request.form value detected' error when attempt submit script tags, still able submit like:
</input><script>alert("hello world");</script>
and when load page script has been added js alert box.
why able submit potentially dangerous script? missing?
Comments
Post a Comment