Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
52593154
Commit
52593154
authored
Jan 15, 2004
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Don't use bare 'eval' to check filtered set membershp (merge from
2.6 / 2.7 audit).
parent
e20e60ce
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
lib/python/Products/PluginIndexes/TopicIndex/FilteredSet.py
lib/python/Products/PluginIndexes/TopicIndex/FilteredSet.py
+3
-2
No files found.
lib/python/Products/PluginIndexes/TopicIndex/FilteredSet.py
View file @
52593154
...
...
@@ -11,13 +11,14 @@
#
##############################################################################
__version__
=
'$Id: FilteredSet.py,v 1.
6 2003/12/31 21:18:03 post
er Exp $'
__version__
=
'$Id: FilteredSet.py,v 1.
7 2004/01/15 23:17:17 tseav
er Exp $'
from
ZODB.POSException
import
ConflictError
from
BTrees.IIBTree
import
IITreeSet
from
Persistence
import
Persistent
from
Globals
import
DTMLFile
from
zLOG
import
WARNING
,
LOG
from
RestrictedPython.Eval
import
RestrictionCapableEval
import
sys
...
...
@@ -69,7 +70,7 @@ class PythonFilteredSet(FilteredSetBase):
def
index_object
(
self
,
documentId
,
o
):
try
:
if
eval
(
self
.
expr
):
# XXX trusted code!
if
RestrictionCapableEval
(
self
.
expr
).
eval
({
'o'
:
o
}):
self
.
ids
.
insert
(
documentId
)
else
:
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment