P
P
pocteg2015-02-27 15:33:47
Java
pocteg, 2015-02-27 15:33:47

How to make protection from xss at the level of the entire application in spring MVC (3.x)?

Good afternoon!
I have a spring MVC application. I need to add protection against CSS attacks at the application level. How can I make sure that all incoming parameters from any requests are automatically escaped? The option when each request is separate, or escaping when outputting to jsp is not suitable, because there is a danger of forgetting any parameter.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai Pavlov, 2015-02-27
@gurinderu

In web.xml

<context-param>
    <param-name>defaultHtmlEscape</param-name>
    <param-value>true</param-value>
</context-param>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question