Skip to content

Commit 4836354

Browse files
committed
[FIX] safe_eval: allow STORE_FAST and DELETE_FAST opcodes, used e.g. for comprehension expressions
bzr revid: [email protected]
1 parent 93ba7cc commit 4836354

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

openerp/tools/safe_eval.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@
6666
'MAKE_FUNCTION', 'SLICE+0', 'SLICE+1', 'SLICE+2', 'SLICE+3',
6767
# New in Python 2.7 - http://bugs.python.org/issue4715 :
6868
'JUMP_IF_FALSE_OR_POP', 'JUMP_IF_TRUE_OR_POP', 'POP_JUMP_IF_FALSE',
69-
'POP_JUMP_IF_TRUE', 'SETUP_EXCEPT', 'END_FINALLY', 'LOAD_FAST',
69+
'POP_JUMP_IF_TRUE', 'SETUP_EXCEPT', 'END_FINALLY',
70+
'LOAD_FAST', 'STORE_FAST', 'DELETE_FAST',
7071
'LOAD_GLOBAL', # Only allows access to restricted globals
7172
] if x in opmap))
7273

0 commit comments

Comments
 (0)