diff share/roundup/templates/devel/html/page.html @ 4880:ca692423e401

Different approach to fix XSS in issue2550817 Encapsulate the error/ok message append method as add_ok_message and add_error_message. The new approach escapes the messages when appending -- at a point in the code where we still know where the message comes from. Escaping is the default but can bei turned off. This also fixes issue2550836 where certain messages may contain links. Another advantage of the new fix is that users don't need to change installed trackers and are secure by default.
author Ralf Schlatterbeck <rsc@runtux.com>
date Mon, 31 Mar 2014 18:19:23 +0200
parents 24b8011cd2dc
children 894aa07be6cb
line wrap: on
line diff
--- a/share/roundup/templates/devel/html/page.html	Sat Mar 29 11:59:37 2014 +0100
+++ b/share/roundup/templates/devel/html/page.html	Mon Mar 31 18:19:23 2014 +0200
@@ -234,9 +234,11 @@
   <div class="content">
    <h1 id="breadcrumb"><span metal:define-slot="body_title">body title</span></h1>
    <p tal:condition="options/error_message | nothing" class="error-message"
-      tal:repeat="m options/error_message" tal:content="m" />
+      tal:repeat="m options/error_message"
+      tal:content="structure string:$m <br/ > " />
    <p tal:condition="options/ok_message | nothing" class="ok-message">
-    <span tal:repeat="m options/ok_message" tal:content="m" />
+    <span tal:repeat="m options/ok_message"
+          tal:content="structure string:$m <br/ > " />
     <a class="form-small" tal:attributes="href request/current_url"
        i18n:translate="">clear this message</a>
    </p>

Roundup Issue Tracker: http://roundup-tracker.org/