Commit be721e06 authored by Romain Courteaud's avatar Romain Courteaud Committed by Alain Takoudjou

Prevent more security checking.

Calling an external python will prevent calling navigate from a python script
with a proxy role.
parent 218b2a4d
......@@ -6,6 +6,7 @@ from Products.ERP5Type.Document import newTempDocument
import hashlib
from zLOG import LOG, WARNING
import datetime
from Products.DCWorkflow.DCWorkflow import ValidationFailed
try:
import suds
......@@ -292,7 +293,17 @@ class PayzenService(XMLObject, PayzenSOAP):
def navigate(self, page_template, payzen_dict, REQUEST=None, **kw):
"""Returns configured template used to do the payment"""
self.Base_checkConsistency()
check_result = self.checkConsistency()
message_list = []
for err in check_result:
if getattr(err, 'getTranslatedMessage', None) is not None:
message_list.append(err.getTranslatedMessage())
else:
# backward compatibility:
message_list.append(err[3])
if message_list:
raise ValidationFailed, message_list
temp_document = newTempDocument(self, 'id')
temp_document.edit(
link_url_string=self.getLinkUrlString(),
......
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