~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to debian/patches/00844_fix_gui_editor_formatter_XSS_issues.patch

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mfrom: (0.9.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080622211713-fpo2zrq3s5dfecxg
Tags: 1.7.0-3
Simplify /etc/moin/wikilist format: "USER URL" (drop unneeded middle
CONFIG_DIR that was wrongly advertised as DATA_DIR).  Make
moin-mass-migrate handle both formats and warn about deprecation of
the old one.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
# HG changeset patch
3
 
# User Thomas Waldmann <tw AT waldmann-edv DOT de>
4
 
# Date 1188305310 -7200
5
 
# Node ID d0152eeb4499264758c33d320e73db478515ba44
6
 
# Parent 9880e04b1be245861730631896cec4f7003229ec
7
 
fix gui editor formatter XSS issues
8
 
 
9
 
--- a/MoinMoin/formatter/text_gedit.py  Mon Jul 30 17:52:20 2007 +0200
10
 
+++ b/MoinMoin/formatter/text_gedit.py  Tue Aug 28 14:48:30 2007 +0200
11
 
@@ -58,6 +58,8 @@ class Formatter(text_html.Formatter):
12
 
         return self.url(1, href, title=title, do_escape=1, css=html_class) # interwiki links with pages with umlauts
13
 
 
14
 
     def attachment_inlined(self, url, text, **kw):
15
 
+        url = wikiutil.escape(url)
16
 
+        text = wikiutil.escape(text)
17
 
         if url == text:
18
 
             return '<span style="background-color:#ffff11">inline:%s</span>' % url
19
 
         else:
20
 
@@ -98,7 +100,7 @@ class Formatter(text_html.Formatter):
21
 
             result =  "[[%s(%s)]]" % (name, args)    
22
 
         else:
23
 
             result = "[[%s]]" % name
24
 
-        return '<span style="background-color:#ffff11">%s</span>' % result
25
 
+        return '<span style="background-color:#ffff11">%s</span>' % wikiutil.escape(result)
26
 
 
27
 
     def processor(self, processor_name, lines, is_parser=0):
28
 
         """ processor_name MUST be valid!
29
 
--- a/docs/CHANGES      Mon Jul 30 17:52:20 2007 +0200
30
 
+++ b/docs/CHANGES      Tue Aug 28 14:48:30 2007 +0200
31
 
@@ -33,6 +33,7 @@ Version 1.5.current:
32
 
     * AttachFile overwrite mode (introduced in 1.5.7) did not check delete
33
 
       rights, but only write rights. Now it checks that the user has write AND
34
 
       delete rights before overwriting a file.
35
 
+    * Fixed potential XSS issues related to feeding of gui editor.
36
 
 
37
 
 Version 1.5.8:
38
 
   New features:
39