Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to handle XSS on NVelocity
    primarykey
    data
    text
    <p>Castle Project is full of features, includes some awesome subprojects, and developing with it has been a pleasure.</p> <p>My team is almost ready to deliver a custom made <a href="http://en.wikipedia.org/wiki/Enterprise_asset_management" rel="nofollow noreferrer">EAM</a> and we are polishing our system. We tried some basic XSS attacks and guess: They all worked.</p> <p>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.</p> <p>NVelocity by default doesn't escape anything, so this code:</p> <pre><code>${entity.Field} </code></pre> <p>with Field containing things like:</p> <pre><code>&lt;script&gt;alert('xss!')&lt;/script&gt; </code></pre> <p>would give us a nice xss alert.</p> <p>Microsoft's AntiXSS library looks good: handles several types of possible XSS vectors, and so. We ran into AndyPike's <a href="http://dobrzanski.net/2009/01/14/nvelocity-and-xss/#comment-18974" rel="nofollow noreferrer">helper</a>, 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.</p> <p>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?</p> <p>Thanks!</p> <p>PS.: <em>Stackoverflowers</em> using Castle Project would use such patch?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload