HttpRequestValidationException and cross-site scripting XSS

北城余情 提交于 2019-12-21 22:32:33

问题


By using HttpRequestValidationException, does it necessarily protect you against all cross-scripting threats?

Are there situations where a potentially dangerous script might manage to go undetected?


回答1:


No, in short it doesn't. Please decompile it using reflector and see what it does. An attack on an html attribute could be: " onfocus=alert(1) autofocus There are no < or > in this yet it still works. Please use AntiXss and check the OWASP XSS prevention cheat sheet. So you need to pay attention especially whenever you are using unescaped attributes like Literal.




回答2:


Yes, in short it does. It can't do everything related to XSS, like control what you are doing with JavaScript(eval()...etc). As far as request being processed by your ASP.NET applications, it does a good job, there are always exceptions.



来源:https://stackoverflow.com/questions/8437528/httprequestvalidationexception-and-cross-site-scripting-xss

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!