[Zope-Checkins] SVN: Zope/trunk/ Collector #1457: ZCTextIndex's QueryError and ParseError are now available for import from untrusted code.

Chris Withers chris at simplistix.co.uk
Fri Sep 24 21:07:46 EDT 2004


Log message for revision 27685:
  Collector #1457: ZCTextIndex's QueryError and ParseError are now available for import from untrusted code.
  
  


Changed:
  U   Zope/trunk/doc/CHANGES.txt
  U   Zope/trunk/lib/python/Products/ZCTextIndex/__init__.py


-=-
Modified: Zope/trunk/doc/CHANGES.txt
===================================================================
--- Zope/trunk/doc/CHANGES.txt	2004-09-25 00:51:41 UTC (rev 27684)
+++ Zope/trunk/doc/CHANGES.txt	2004-09-25 01:07:46 UTC (rev 27685)
@@ -157,6 +157,9 @@
 
     Bugs fixed
  
+     - Collector #1457: ZCTextIndex's QueryError and ParseError 
+       are now available for import from untrusted code.
+
      - Collector #1473: zpasswd.py can now accept --username 
        without --password
 

Modified: Zope/trunk/lib/python/Products/ZCTextIndex/__init__.py
===================================================================
--- Zope/trunk/lib/python/Products/ZCTextIndex/__init__.py	2004-09-25 00:51:41 UTC (rev 27684)
+++ Zope/trunk/lib/python/Products/ZCTextIndex/__init__.py	2004-09-25 01:07:46 UTC (rev 27685)
@@ -53,3 +53,10 @@
 
 def getIndexTypes(self):
     return ZCTextIndex.index_types.keys()
+
+## Allow relevent exceptions to be caught in untrusted code
+from AccessControl import ModuleSecurityInfo
+ModuleSecurityInfo('Products').declarePublic('ZCTextIndex')
+ModuleSecurityInfo('Products.ZCTextIndex').declarePublic('ParseTree')
+ModuleSecurityInfo('Products.ZCTextIndex.ParseTree').declarePublic('QueryError')
+ModuleSecurityInfo('Products.ZCTextIndex.ParseTree').declarePublic('ParseError')



More information about the Zope-Checkins mailing list