Castle Project is full of features, includes some awesome subprojects, and developing with it has been a pleasure.
My team is almost ready to deliver a custom made EAM and we are polishing our system. We tried some basic XSS attacks and guess: They all worked.
Even though it will be running in a Intranet environment, we wouldn't like users to accidentally break the whole system, and we are studying solutions to handle XSS problems.
NVelocity by default doesn't escape anything, so this code:
${entity.Field}
with Field containing things like:
<script>alert('xss!')</script>
would give us a nice xss alert.
Microsoft's AntiXSS library looks good: handles several types of possible XSS vectors, and so. We ran into AndyPike's helper, but this solution would make us refactor some couple thousand lines. Yeah, not good. And this wouldn't handle ActiveRecord/NVelocity auto bind when editing existing entities.
The question is: Using output encoding techniques, is it possible/recommended to patch Castle Project's NVelocity engine? Just like they did with Brail? Anyone has a better idea?
Thanks!
PS.: Stackoverflowers using Castle Project would use such patch?