Wednesday, May 4, 2011

GWT UiBinder.useSafeHtmlTemplates warning on compiling

I just update to the GWT 2.3 version and every time I compile my project I get this error message:
1 [WARN] Configuration property UiBinder.useSafeHtmlTemplates is false! UiBinder SafeHtml integration is off, leaving your users more vulnerable to cross-site scripting attacks. This property will default to true in future releases of GWT.

I start to hate that message so I check in internet but there was not really documentation about it. Looking more deeper into the GWT code project I found this page:

http://code.google.com/p/google-web-toolkit/wiki/MultiValuedConfigProperties

I never used this feature but basically describes how to set up those parameters, so I tried to use this in my <module>.gwt.xml file:

1 <set-configuration-property name="UiBinder.useSafeHtmlTemplates" 2 value="true" />

and now I do not get the warning message anymore. The use of SafeHtml is some kind of rewriting of the UiBinder code which was generated before. Using the UiBinder SafeHtmlTemplates as the warning message says should make your code more secure. I hope this is really soZwinkerndes Smiley.

8 comments:

  1. AnonymousMay 19, 2011

    Thanks! Just what I needed.

    ReplyDelete
  2. Thanks for that solution! That is just what i was searching for.

    ReplyDelete
  3. AnonymousJune 22, 2011

    Extremely useful. Thanks a lot.

    ReplyDelete
  4. excellent! thanks

    ReplyDelete
  5. before enabling this check out whether you are affected by the bugs mentioned in http://code.google.com/webtoolkit/release-notes.html#Release_Notes_2_3_0

    -- Den

    ReplyDelete
  6. Thanks, I also googled hard time but you saved

    ReplyDelete