[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/Security - _protections.py:1.2.12.1
Jim Fulton
jim@zope.com
Thu, 14 Nov 2002 11:30:33 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Security
In directory cvs.zope.org:/tmp/cvs-serv2390
Modified Files:
Tag: Zope3-Bangalore-TTW-Branch
_protections.py
Log Message:
Added security assertions for PersistentList and PersistentDict.
=== Zope3/lib/python/Zope/App/Security/_protections.py 1.2 => 1.2.12.1 ===
--- Zope3/lib/python/Zope/App/Security/_protections.py:1.2 Mon Jun 10 19:28:16 2002
+++ Zope3/lib/python/Zope/App/Security/_protections.py Thu Nov 14 11:30:33 2002
@@ -51,5 +51,22 @@
for which in 'OO', 'II', 'OI', 'IO':
_protect(which)
+ from Persistence.PersistentList import PersistentList
+
+ defineChecker(PersistentList,
+ NamesChecker(
+ ['__getitem__', '__getslice__', '__len__', '__iter__',
+ '__contains__', 'index', 'count'])
+ )
+
+ from Persistence.PersistentDict import PersistentDict
+
+ defineChecker(PersistentDict,
+ NamesChecker(['__getitem__', '__len__', '__iter__',
+ 'get', 'has_key', '__copy__',
+ 'keys', 'values', 'items',
+ 'iterkeys', 'iteritems', 'itervalues', '__contains__',
+ ]
+ )
+ )
-