Commit a167d713 authored by Jérome Perrin's avatar Jérome Perrin

Use sci['object'] instead of sci.object to workaround security problems with...

Use sci['object'] instead of sci.object to workaround security problems with proxy roles in workflow scripts.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14248 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4ab8a387
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from Products.ERP5Type.Message import Message\n <value> <string>from Products.ERP5Type.Message import Message\n
\n \n
pref = sci.object\n pref = sci[\'object\']\n
portal = sci.getPortal()\n portal = sci.getPortal()\n
LOG = lambda msg: pref.log("PreferenceWorkflow.disableOtherPreferences on %s"%pref, msg)\n LOG = lambda msg: pref.log("PreferenceWorkflow.disableOtherPreferences on %s"%pref, msg)\n
N_ = lambda msg, **kw: Message(\'erp5_ui\', msg, **kw)\n N_ = lambda msg, **kw: Message(\'erp5_ui\', msg, **kw)\n
...@@ -141,8 +141,9 @@ for p in portal.portal_preferences.searchFolder(spec=(\'ERP5 Preference\',)) :\n ...@@ -141,8 +141,9 @@ for p in portal.portal_preferences.searchFolder(spec=(\'ERP5 Preference\',)) :\n
<string>sci</string> <string>sci</string>
<string>Products.ERP5Type.Message</string> <string>Products.ERP5Type.Message</string>
<string>Message</string> <string>Message</string>
<string>_getattr_</string> <string>_getitem_</string>
<string>pref</string> <string>pref</string>
<string>_getattr_</string>
<string>portal</string> <string>portal</string>
<string>LOG</string> <string>LOG</string>
<string>N_</string> <string>N_</string>
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>rule = state_change.object.getParentValue()\n <value> <string>rule = state_change[\'object\'].getParentValue()\n
\n \n
if rule.getPortalType() in (\'Invoice Transaction Rule\', \'Payment Rule\') :\n if rule.getPortalType() in (\'Invoice Transaction Rule\', \'Payment Rule\') :\n
rule.activate(\n rule.activate(\n
...@@ -119,6 +119,7 @@ if rule.getPortalType() in (\'Invoice Transaction Rule\', \'Payment Rule\') :\n ...@@ -119,6 +119,7 @@ if rule.getPortalType() in (\'Invoice Transaction Rule\', \'Payment Rule\') :\n
<tuple> <tuple>
<string>state_change</string> <string>state_change</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>_getitem_</string>
<string>rule</string> <string>rule</string>
</tuple> </tuple>
</value> </value>
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>matrix = state_change.object\n <value> <string>matrix = state_change[\'object\']\n
matrix.activate(\n matrix.activate(\n
after_path_and_method_id=([matrix.getPath(),],\n after_path_and_method_id=([matrix.getPath(),],\n
[\'immediateReindexObject\', \'recursiveImmediateReindexObject\'])\n [\'immediateReindexObject\', \'recursiveImmediateReindexObject\'])\n
...@@ -116,8 +116,9 @@ matrix.activate(\n ...@@ -116,8 +116,9 @@ matrix.activate(\n
<value> <value>
<tuple> <tuple>
<string>state_change</string> <string>state_change</string>
<string>_getattr_</string> <string>_getitem_</string>
<string>matrix</string> <string>matrix</string>
<string>_getattr_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
309 314
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment