Lines 1-194
Link Here
|
1 |
Index: RELEASE |
|
|
2 |
=================================================================== |
3 |
--- RELEASE (.../trac-0.10.3) (revision 4957) |
4 |
+++ RELEASE (.../trac-0.10.3.1) (revision 4957) |
5 |
@@ -1,8 +1,8 @@ |
6 |
-Release Notes for Trac 0.10.3 |
7 |
-============================= |
8 |
-December 12, 2006 |
9 |
+Release Notes for Trac 0.10.3.1 |
10 |
+=============================== |
11 |
+March 8, 2007 |
12 |
|
13 |
-We're happy to announce the Trac 0.10.3 release, available from: |
14 |
+We're happy to announce the Trac 0.10.3.1 release, available from: |
15 |
|
16 |
http://trac.edgewall.org/wiki/TracDownload |
17 |
|
18 |
@@ -11,18 +11,15 @@ |
19 |
|
20 |
http://trac.edgewall.org/wiki/MailingList |
21 |
|
22 |
-Trac 0.10.3 is a bug fix release and fixes a few bugs introduced in the |
23 |
-0.10.1 and 0.10.2 releases. A brief summary of major changes: |
24 |
+Trac 0.10.3.1 is a security release: |
25 |
+* Always send "Content-Disposition: attachment" headers where potentially |
26 |
+ unsafe (user provided) content is available for download. This behaviour |
27 |
+ can be altered using the "render_unsafe_content" option in the |
28 |
+ "attachment" and "browser" sections of trac.ini. |
29 |
+ * Fixed XSS vulnerability in "download wiki page as text" in combination with |
30 |
+ Microsoft IE. Reported by Yoshinori Oota, Business Architects Inc. |
31 |
|
32 |
- * Timeline fail to load with a "NoSuchChangeset" error message (#4132). |
33 |
- * Timed out MySQL connections not handled properly (#3645). |
34 |
- * Subversion repository resync broken. (#4204). |
35 |
|
36 |
-The complete list of closed tickets can be found here: |
37 |
- |
38 |
- http://trac.edgewall.org/query?status=closed&milestone=0.10.3 |
39 |
- |
40 |
- |
41 |
Acknowledgements |
42 |
================ |
43 |
|
44 |
Index: wiki-default/WikiStart |
45 |
=================================================================== |
46 |
--- wiki-default/WikiStart (.../trac-0.10.3) (revision 4957) |
47 |
+++ wiki-default/WikiStart (.../trac-0.10.3.1) (revision 4957) |
48 |
@@ -1,4 +1,4 @@ |
49 |
-= Welcome to Trac 0.10.3 = |
50 |
+= Welcome to Trac 0.10.3.1 = |
51 |
|
52 |
Trac is a '''minimalistic''' approach to '''web-based''' management of |
53 |
'''software projects'''. Its goal is to simplify effective tracking and handling of software issues, enhancements and overall progress. |
54 |
Index: ChangeLog |
55 |
=================================================================== |
56 |
--- ChangeLog (.../trac-0.10.3) (revision 4957) |
57 |
+++ ChangeLog (.../trac-0.10.3.1) (revision 4957) |
58 |
@@ -1,3 +1,14 @@ |
59 |
+Trac 0.10.3.1 (March 8, 2007) |
60 |
+http://svn.edgewall.org/repos/trac/tags/trac-0.10.3.1 |
61 |
+ |
62 |
+ Trac 0.10.3.1 is a security release: |
63 |
+ * Always send "Content-Disposition: attachment" headers where potentially |
64 |
+ unsafe (user provided) content is available for download. This behaviour |
65 |
+ can be altered using the "render_unsafe_content" option in the |
66 |
+ "attachment" and "browser" sections of trac.ini. |
67 |
+ * Fixed XSS vulnerability in "download wiki page as text" in combination with |
68 |
+ Microsoft IE. Reported by Yoshinori Oota, Business Architects Inc. |
69 |
+ |
70 |
Trac 0.10.3 (Dec 12, 2006) |
71 |
http://svn.edgewall.org/repos/trac/tags/trac-0.10.3 |
72 |
|
73 |
Index: trac/attachment.py |
74 |
=================================================================== |
75 |
--- trac/attachment.py (.../trac-0.10.3) (revision 4957) |
76 |
+++ trac/attachment.py (.../trac-0.10.3.1) (revision 4957) |
77 |
@@ -555,22 +555,24 @@ |
78 |
# Eventually send the file directly |
79 |
format = req.args.get('format') |
80 |
if format in ('raw', 'txt'): |
81 |
- if not self.render_unsafe_content and not binary: |
82 |
- # Force browser to download HTML/SVG/etc pages that may |
83 |
- # contain malicious code enabling XSS attacks |
84 |
- req.send_header('Content-Disposition', 'attachment;' + |
85 |
- 'filename=' + attachment.filename) |
86 |
- if not mime_type or (self.render_unsafe_content and \ |
87 |
- not binary and format == 'txt'): |
88 |
- mime_type = 'text/plain' |
89 |
+ if not self.render_unsafe_content: |
90 |
+ # Force browser to download files instead of rendering |
91 |
+ # them, since they might contain malicious code enabling |
92 |
+ # XSS attacks |
93 |
+ req.send_header('Content-Disposition', 'attachment') |
94 |
+ if format == 'txt': |
95 |
+ mime_type = 'text/plain' |
96 |
+ elif not mime_type: |
97 |
+ mime_type = 'application/octet-stream' |
98 |
if 'charset=' not in mime_type: |
99 |
charset = mimeview.get_charset(str_data, mime_type) |
100 |
mime_type = mime_type + '; charset=' + charset |
101 |
+ |
102 |
req.send_file(attachment.path, mime_type) |
103 |
|
104 |
# add ''Plain Text'' alternate link if needed |
105 |
- if self.render_unsafe_content and not binary and \ |
106 |
- mime_type and not mime_type.startswith('text/plain'): |
107 |
+ if (self.render_unsafe_content and |
108 |
+ mime_type and not mime_type.startswith('text/plain')): |
109 |
plaintext_href = attachment.href(req, format='txt') |
110 |
add_link(req, 'alternate', plaintext_href, 'Plain Text', |
111 |
mime_type) |
112 |
Index: trac/mimeview/api.py |
113 |
=================================================================== |
114 |
--- trac/mimeview/api.py (.../trac-0.10.3) (revision 4957) |
115 |
+++ trac/mimeview/api.py (.../trac-0.10.3.1) (revision 4957) |
116 |
@@ -604,8 +604,8 @@ |
117 |
content, selector) |
118 |
req.send_response(200) |
119 |
req.send_header('Content-Type', output_type) |
120 |
- req.send_header('Content-Disposition', 'filename=%s.%s' % (filename, |
121 |
- ext)) |
122 |
+ req.send_header('Content-Disposition', 'attachment; filename=%s.%s' % |
123 |
+ (filename, ext)) |
124 |
req.end_headers() |
125 |
req.write(content) |
126 |
raise RequestDone |
127 |
Index: trac/__init__.py |
128 |
=================================================================== |
129 |
--- trac/__init__.py (.../trac-0.10.3) (revision 4957) |
130 |
+++ trac/__init__.py (.../trac-0.10.3.1) (revision 4957) |
131 |
@@ -11,7 +11,7 @@ |
132 |
""" |
133 |
__docformat__ = 'epytext en' |
134 |
|
135 |
-__version__ = '0.10.3' |
136 |
+__version__ = '0.10.3.1' |
137 |
__url__ = 'http://trac.edgewall.org/' |
138 |
__copyright__ = '(C) 2003-2006 Edgewall Software' |
139 |
__license__ = 'BSD' |
140 |
Index: trac/versioncontrol/web_ui/browser.py |
141 |
=================================================================== |
142 |
--- trac/versioncontrol/web_ui/browser.py (.../trac-0.10.3) (revision 4957) |
143 |
+++ trac/versioncontrol/web_ui/browser.py (.../trac-0.10.3.1) (revision 4957) |
144 |
@@ -21,7 +21,7 @@ |
145 |
from fnmatch import fnmatchcase |
146 |
|
147 |
from trac import util |
148 |
-from trac.config import ListOption, Option |
149 |
+from trac.config import ListOption, BoolOption, Option |
150 |
from trac.core import * |
151 |
from trac.mimeview import Mimeview, is_binary, get_mimetype |
152 |
from trac.perm import IPermissionRequestor |
153 |
@@ -57,6 +57,18 @@ |
154 |
glob patterns, i.e. "*" can be used as a wild card) |
155 |
(''since 0.10'')""") |
156 |
|
157 |
+ render_unsafe_content = BoolOption('browser', 'render_unsafe_content', |
158 |
+ 'false', |
159 |
+ """Whether attachments should be rendered in the browser, or |
160 |
+ only made downloadable. |
161 |
+ |
162 |
+ Pretty much any file may be interpreted as HTML by the browser, |
163 |
+ which allows a malicious user to attach a file containing cross-site |
164 |
+ scripting attacks. |
165 |
+ |
166 |
+ For public sites where anonymous users can create attachments it is |
167 |
+ recommended to leave this option disabled (which is the default).""") |
168 |
+ |
169 |
# INavigationContributor methods |
170 |
|
171 |
def get_active_navigation_item(self, req): |
172 |
@@ -216,6 +228,11 @@ |
173 |
format == 'txt' and 'text/plain' or mime_type) |
174 |
req.send_header('Content-Length', node.content_length) |
175 |
req.send_header('Last-Modified', http_date(node.last_modified)) |
176 |
+ if not self.render_unsafe_content: |
177 |
+ # Force browser to download files instead of rendering |
178 |
+ # them, since they might contain malicious code enabling |
179 |
+ # XSS attacks |
180 |
+ req.send_header('Content-Disposition', 'attachment') |
181 |
req.end_headers() |
182 |
|
183 |
while 1: |
184 |
Index: trac/scripts/tests/admin-tests.txt |
185 |
=================================================================== |
186 |
--- trac/scripts/tests/admin-tests.txt (.../trac-0.10.3) (revision 4957) |
187 |
+++ trac/scripts/tests/admin-tests.txt (.../trac-0.10.3.1) (revision 4957) |
188 |
@@ -1,5 +1,5 @@ |
189 |
===== test_help_ok ===== |
190 |
-trac-admin - The Trac Administration Console 0.10.3 |
191 |
+trac-admin - The Trac Administration Console 0.10.3.1 |
192 |
|
193 |
Usage: trac-admin </path/to/projenv> [command [subcommand] [option ...]] |
194 |
|