changeset 844:d0152eeb4499

fix gui editor formatter XSS issues
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 28 Aug 2007 14:48:30 +0200
parents 9880e04b1be2
children 4a7de0173734 4ede07e792dd
files MoinMoin/formatter/text_gedit.py docs/CHANGES
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/formatter/text_gedit.py	Mon Jul 30 17:52:20 2007 +0200
+++ b/MoinMoin/formatter/text_gedit.py	Tue Aug 28 14:48:30 2007 +0200
@@ -58,6 +58,8 @@
         return self.url(1, href, title=title, do_escape=1, css=html_class) # interwiki links with pages with umlauts
 
     def attachment_inlined(self, url, text, **kw):
+        url = wikiutil.escape(url)
+        text = wikiutil.escape(text)
         if url == text:
             return '<span style="background-color:#ffff11">inline:%s</span>' % url
         else:
@@ -98,7 +100,7 @@
             result =  "[[%s(%s)]]" % (name, args)    
         else:
             result = "[[%s]]" % name
-        return '<span style="background-color:#ffff11">%s</span>' % result
+        return '<span style="background-color:#ffff11">%s</span>' % wikiutil.escape(result)
 
     def processor(self, processor_name, lines, is_parser=0):
         """ processor_name MUST be valid!
--- a/docs/CHANGES	Mon Jul 30 17:52:20 2007 +0200
+++ b/docs/CHANGES	Tue Aug 28 14:48:30 2007 +0200
@@ -33,6 +33,7 @@
     * AttachFile overwrite mode (introduced in 1.5.7) did not check delete
       rights, but only write rights. Now it checks that the user has write AND
       delete rights before overwriting a file.
+    * Fixed potential XSS issues related to feeding of gui editor.
 
 Version 1.5.8:
   New features: