summaryrefslogtreecommitdiff
path: root/www/zope210/patches/patch-aj
blob: 499c6622a649b0f052bb7620d8dd43271f86b7d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$NetBSD: patch-aj,v 1.1 2008/08/17 15:12:57 taca Exp $

Patch #1 corresponding to security advisory 2008-08-12.

--- lib/python/Products/PythonScripts/PythonScript.py.orig	2008-05-10 15:33:18.000000000 +0900
+++ lib/python/Products/PythonScripts/PythonScript.py
@@ -324,7 +324,11 @@ class PythonScript(Script, Historical, C
         g['__file__'] = getattr(self, '_filepath', None) or self.get_filepath()
         f = new.function(fcode, g, None, fadefs)
 
-        result = f(*args, **kw)
+        try:
+            result = f(*args, **kw)
+        except SystemExit:
+            raise ValueError('SystemExit cannot be raised within a PythonScript')
+
         if keyset is not None:
             # Store the result in the cache.
             self.ZCacheable_set(result, keywords=keyset)