|
|
The 2.0.4 documentation for g:fieldValue says, "Once the value is obtained it will be automatically HTML-encoded."
However, I just ran a test where I entered "</script><script>alert("XSS Vulnerable!");</script>" as a field value. The show page displays the value using g:fieldValue. When the page is displayed, the alert pops up!
In Config.groovy I have grails.views.default.codec= "html" to encode values displayed with ${xxx} by default.
Am I perhaps doing something wrong, or is there a bug? Is there an option (undocumented) to force HTML encoding with fieldValue?
- Jasen.
|