security proxied __getslice__ on ResultSet
Bug #237615 reported by
Jürgen Kartnaller
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Storm |
Fix Released
|
Low
|
Jamu Kakar |
Bug Description
Slicing on a security proxied ResultSet is not possible.
This happens because Python first checks for the existence of __getslice__.
__getslice__ is not included in IResultSet which leads to an attribute error.
Solution :
- add __getslice__ to IResultSet
- or add <allow attributes=
Workaround until this is fixed :
Add this to your zcml :
<class class="
<allow attributes=
</class>
Related branches
lp:~jkakar/storm/allow-get-slice
(Merged)
To post a comment you must log in.
I've pushed a branch with the following trivial diff:
=== modified file 'storm/ zope/configure. zcml' configure. zcml 2007-08-05 22:15:26 +0000 configure. zcml 2008-06-05 22:01:38 +0000
--- storm/zope/
+++ storm/zope/
@@ -11,6 +11,7 @@
<class class=" storm.store. ResultSet" > ".interfaces. IResultSet" /> "__getslice_ _" />
<allow interface=
+ <allow attributes=
</class>
<class class=" storm.store. EmptyResultSet" >
The reason I'm not merging it directly to trunk is that I'm not 100%
sure we want this. Isn't __getitem__ used in preference to
__getslice__?