Priority: Security
Current State: Closed
Released In: 2.0.2
Target Release: patch
Guests should not be able to insert macros or code into topics anonymously. These present a path for insertion of javascript XSS attacks into topics.
This fix will entity encode all inserted text when posted by someone who is not logged in.
Action needed: Any customized
CommentPlugin templates should be reviewed. If you allow guests to comment, then it is critical to change the template to prevent
injection of javascript or macros in anonymous comments.
In any
output
templates, change
encode="off"
to
encode="$encodeguest"
. The
CommentPlugin will replace the token with "off" for logged in users, and "entity" for guests.
Example template change:
-%TMPL:DEF{outputoneliner}% * %<nop>URLPARAM{"comment" encode="off"}% -- %WIKIUSERNAME% - %GMTIME{"$day $month $year"}%%TMPL:END%
+%TMPL:DEF{outputoneliner}% * %<nop>URLPARAM{"comment" encode="$encodeguest"}% -- %WIKIUSERNAME% - %GMTIME{"$day $month $year"}%%TMPL:END%