Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why doesn't grails.views.default.codec default to "html"?

The Grails Config.groovy setting grails.views.default.codec specifies the default codec used to encode data within ${...} in Grails views.

This config setting can take any of the values none (no filtering required), html (to avoid XSS-attacks) and base64 (has no real-world use-case that I know of).

The Grails default is none (no filtering).

Questions:

  • Are there any compelling technical reasons not to use the safer option "html"?
  • When do you choose to go with the default option of "none" in your Grails projects?
like image 355
knorv Avatar asked Jul 06 '26 02:07

knorv


1 Answers

A question on similar topic here.. I don't claim big expertise on this, but I imagine. Why it's not html by default is strange to me. I found GRAILS-2945, where this was proposed but ultimately rejected, without too much explanation. There is also some more information in GRAILS-1827, when the issue was first implemented.

like image 119
Jean Barmash Avatar answered Jul 09 '26 04:07

Jean Barmash



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!