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
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
14
def attachment_inlined(self, url, text, **kw):
15
+ url = wikiutil.escape(url)
16
+ text = wikiutil.escape(text)
18
return '<span style="background-color:#ffff11">inline:%s</span>' % url
20
@@ -98,7 +100,7 @@ class Formatter(text_html.Formatter):
21
result = "[[%s(%s)]]" % (name, args)
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)
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.