1 |
hawking 08/01/08 22:18:12 |
2 |
|
3 |
Added: cherrypy-2.2.1-invalidsession.patch |
4 |
cherrypy-2.2.1-py2.5.patch digest-cherrypy-2.2.1-r2 |
5 |
Removed: digest-cherrypy-3.0.2 |
6 |
cherrypy-2.1.1-test-gentoo.patch |
7 |
digest-cherrypy-2.2.1-r1 digest-cherrypy-2.1.1 |
8 |
Log: |
9 |
Revision bump. Backported security patch for 2.2.1, bug 204829. Added patch to fix tests for python-2.5. Drop old. |
10 |
(Portage version: 2.1.4_rc14) |
11 |
|
12 |
Revision Changes Path |
13 |
1.1 dev-python/cherrypy/files/cherrypy-2.2.1-invalidsession.patch |
14 |
|
15 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/cherrypy/files/cherrypy-2.2.1-invalidsession.patch?rev=1.1&view=markup |
16 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/cherrypy/files/cherrypy-2.2.1-invalidsession.patch?rev=1.1&content-type=text/plain |
17 |
|
18 |
Index: cherrypy-2.2.1-invalidsession.patch |
19 |
=================================================================== |
20 |
--- cherrypy/filters/sessionfilter.py 2006-04-25 04:37:45.000000000 +0300 |
21 |
+++ cherrypy/filters/sessionfilter.py 2008-01-08 23:01:09.000000000 +0200 |
22 |
@@ -326,6 +326,8 @@ |
23 |
raise SessionStoragePathNotConfiguredError() |
24 |
fileName = self.SESSION_PREFIX + id |
25 |
file_path = os.path.join(storage_path, fileName) |
26 |
+ if not os.path.normpath(file_path).startswith(storage_path): |
27 |
+ raise cherrypy.HTTPError(400, "Invalid session id in cookie.") |
28 |
return file_path |
29 |
|
30 |
def _lock_file(self, path): |
31 |
--- cherrypy/test/test_session_filter.py 2006-04-25 04:37:40.000000000 +0300 |
32 |
+++ cherrypy/test/test_session_filter.py 2008-01-08 23:00:39.000000000 +0200 |
33 |
@@ -28,7 +28,7 @@ |
34 |
'server.environment': 'production', |
35 |
'session_filter.on': True, |
36 |
'session_filter.storage_type' : 'file', |
37 |
- 'session_filter.storage_path' : '.', |
38 |
+ 'session_filter.storage_path' : os.path.abspath('.'), |
39 |
}) |
40 |
|
41 |
import helper |
42 |
|
43 |
|
44 |
|
45 |
1.1 dev-python/cherrypy/files/cherrypy-2.2.1-py2.5.patch |
46 |
|
47 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/cherrypy/files/cherrypy-2.2.1-py2.5.patch?rev=1.1&view=markup |
48 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/cherrypy/files/cherrypy-2.2.1-py2.5.patch?rev=1.1&content-type=text/plain |
49 |
|
50 |
Index: cherrypy-2.2.1-py2.5.patch |
51 |
=================================================================== |
52 |
diff -ur CherryPy-2.2.1/cherrypy/test/test_core.py CherryPy-2.2.1-py2.5/cherrypy/test/test_core.py |
53 |
--- CherryPy-2.2.1/cherrypy/test/test_core.py 2006-04-25 04:37:40.000000000 +0300 |
54 |
+++ CherryPy-2.2.1-py2.5/cherrypy/test/test_core.py 2008-01-08 23:37:55.000000000 +0200 |
55 |
@@ -824,15 +824,27 @@ |
56 |
self.assertBody(data) |
57 |
|
58 |
def testCookies(self): |
59 |
- self.getPage("/cookies/single?name=First", |
60 |
+ import sys |
61 |
+ if sys.version_info >= (2, 5): |
62 |
+ self.getPage("/cookies/single?name=First", |
63 |
+ [('Cookie', 'First=Dinsdale;')]) |
64 |
+ self.assertHeader('Set-Cookie', 'First=Dinsdale') |
65 |
+ |
66 |
+ self.getPage("/cookies/multiple?names=First&names=Last", |
67 |
+ [('Cookie', 'First=Dinsdale; Last=Piranha;'), |
68 |
+ ]) |
69 |
+ self.assertHeader('Set-Cookie', 'First=Dinsdale') |
70 |
+ self.assertHeader('Set-Cookie', 'Last=Piranha') |
71 |
+ else: |
72 |
+ self.getPage("/cookies/single?name=First", |
73 |
[('Cookie', 'First=Dinsdale;')]) |
74 |
- self.assertHeader('Set-Cookie', 'First=Dinsdale;') |
75 |
+ self.assertHeader('Set-Cookie', 'First=Dinsdale;') |
76 |
|
77 |
- self.getPage("/cookies/multiple?names=First&names=Last", |
78 |
+ self.getPage("/cookies/multiple?names=First&names=Last", |
79 |
[('Cookie', 'First=Dinsdale; Last=Piranha;'), |
80 |
]) |
81 |
- self.assertHeader('Set-Cookie', 'First=Dinsdale;') |
82 |
- self.assertHeader('Set-Cookie', 'Last=Piranha;') |
83 |
+ self.assertHeader('Set-Cookie', 'First=Dinsdale;') |
84 |
+ self.assertHeader('Set-Cookie', 'Last=Piranha;') |
85 |
|
86 |
def testMaxRequestSize(self): |
87 |
self.getPage("/", headers=[('From', "x" * 500)]) |
88 |
diff -ur CherryPy-2.2.1/cherrypy/test/webtest.py CherryPy-2.2.1-py2.5/cherrypy/test/webtest.py |
89 |
--- CherryPy-2.2.1/cherrypy/test/webtest.py 2006-04-25 04:37:40.000000000 +0300 |
90 |
+++ CherryPy-2.2.1-py2.5/cherrypy/test/webtest.py 2008-01-08 23:58:51.000000000 +0200 |
91 |
@@ -204,43 +204,81 @@ |
92 |
def exit(self): |
93 |
sys.exit() |
94 |
|
95 |
- def __call__(self, result=None): |
96 |
- if result is None: |
97 |
- result = self.defaultTestResult() |
98 |
- result.startTest(self) |
99 |
- testMethod = getattr(self, self._TestCase__testMethodName) |
100 |
- try: |
101 |
- try: |
102 |
- self.setUp() |
103 |
- except (KeyboardInterrupt, SystemExit): |
104 |
- raise |
105 |
- except: |
106 |
- result.addError(self, self._TestCase__exc_info()) |
107 |
- return |
108 |
- |
109 |
- ok = 0 |
110 |
+ if sys.version_info >= (2, 5): |
111 |
+ def __call__(self, result=None): |
112 |
+ if result is None: |
113 |
+ result = self.defaultTestResult() |
114 |
+ result.startTest(self) |
115 |
+ testMethod = getattr(self, self._testMethodName) |
116 |
try: |
117 |
- testMethod() |
118 |
- ok = 1 |
119 |
- except self.failureException: |
120 |
- result.addFailure(self, self._TestCase__exc_info()) |
121 |
- except (KeyboardInterrupt, SystemExit): |
122 |
- raise |
123 |
- except: |
124 |
- result.addError(self, self._TestCase__exc_info()) |
125 |
- |
126 |
+ try: |
127 |
+ self.setUp() |
128 |
+ except (KeyboardInterrupt, SystemExit): |
129 |
+ raise |
130 |
+ except: |
131 |
+ result.addError(self, self._exc_info()) |
132 |
+ return |
133 |
+ |
134 |
+ ok = 0 |
135 |
+ try: |
136 |
+ testMethod() |
137 |
+ ok = 1 |
138 |
+ except self.failureException: |
139 |
+ result.addFailure(self, self._exc_info()) |
140 |
+ except (KeyboardInterrupt, SystemExit): |
141 |
+ raise |
142 |
+ except: |
143 |
+ result.addError(self, self._exc_info()) |
144 |
+ |
145 |
+ try: |
146 |
+ self.tearDown() |
147 |
+ except (KeyboardInterrupt, SystemExit): |
148 |
+ raise |
149 |
+ except: |
150 |
+ result.addError(self, self._exc_info()) |
151 |
+ ok = 0 |
152 |
+ if ok: |
153 |
+ result.addSuccess(self) |
154 |
+ finally: |
155 |
+ result.stopTest(self) |
156 |
+ else: |
157 |
+ def __call__(self, result=None): |
158 |
+ if result is None: |
159 |
+ result = self.defaultTestResult() |
160 |
+ result.startTest(self) |
161 |
+ testMethod = getattr(self, self._TestCase__testMethodName) |
162 |
try: |
163 |
- self.tearDown() |
164 |
- except (KeyboardInterrupt, SystemExit): |
165 |
- raise |
166 |
- except: |
167 |
- result.addError(self, self._TestCase__exc_info()) |
168 |
+ try: |
169 |
+ self.setUp() |
170 |
+ except (KeyboardInterrupt, SystemExit): |
171 |
+ raise |
172 |
+ except: |
173 |
+ result.addError(self, self._TestCase__exc_info()) |
174 |
+ return |
175 |
+ |
176 |
ok = 0 |
177 |
- if ok: |
178 |
- result.addSuccess(self) |
179 |
- finally: |
180 |
- result.stopTest(self) |
181 |
- |
182 |
+ try: |
183 |
+ testMethod() |
184 |
+ ok = 1 |
185 |
+ except self.failureException: |
186 |
+ result.addFailure(self, self._TestCase__exc_info()) |
187 |
+ except (KeyboardInterrupt, SystemExit): |
188 |
+ raise |
189 |
+ except: |
190 |
+ result.addError(self, self._TestCase__exc_info()) |
191 |
+ |
192 |
+ try: |
193 |
+ self.tearDown() |
194 |
+ except (KeyboardInterrupt, SystemExit): |
195 |
+ raise |
196 |
+ except: |
197 |
+ result.addError(self, self._TestCase__exc_info()) |
198 |
+ ok = 0 |
199 |
+ if ok: |
200 |
+ result.addSuccess(self) |
201 |
+ finally: |
202 |
+ result.stopTest(self) |
203 |
+ |
204 |
def assertStatus(self, status, msg=None): |
205 |
"""Fail if self.status != status.""" |
206 |
if isinstance(status, basestring): |
207 |
|
208 |
|
209 |
|
210 |
1.1 dev-python/cherrypy/files/digest-cherrypy-2.2.1-r2 |
211 |
|
212 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/cherrypy/files/digest-cherrypy-2.2.1-r2?rev=1.1&view=markup |
213 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/cherrypy/files/digest-cherrypy-2.2.1-r2?rev=1.1&content-type=text/plain |
214 |
|
215 |
Index: digest-cherrypy-2.2.1-r2 |
216 |
=================================================================== |
217 |
MD5 14bf17b0706bc480342cb8fcfaed74cd CherryPy-2.2.1.tar.gz 219932 |
218 |
RMD160 c8f406c5eaedb6f710dc746528b8474df48cb3c8 CherryPy-2.2.1.tar.gz 219932 |
219 |
SHA256 af83ef4f7b6ffabfccea2794cc61ca0f6fabf24c95901b22ea36e5407ffb794b CherryPy-2.2.1.tar.gz 219932 |
220 |
|
221 |
|
222 |
|
223 |
-- |
224 |
gentoo-commits@l.g.o mailing list |