Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SEC] report_xls: fix unsafe eval #44

Merged
merged 1 commit into from
Feb 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion report_xls/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
##############################################################################
{
'name': 'Excel report engine',
'version': '8.0.0.6.0',
'version': '8.0.0.6.1',
'license': 'AGPL-3',
'author': "Noviat,Odoo Community Association (OCA)",
'website': 'http://www.noviat.com',
Expand Down
3 changes: 2 additions & 1 deletion report_xls/report_xls.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from datetime import datetime
from openerp.osv.fields import datetime as datetime_field
from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT
from openerp.tools.safe_eval import safe_eval
import inspect
from types import CodeType
from openerp.report.report_sxw import report_sxw
Expand Down Expand Up @@ -160,7 +161,7 @@ def render(self, wanted, col_specs, rowtype, render_space='empty'):
row = col_specs[wanted][rowtype][:]
for i in range(len(row)):
if isinstance(row[i], CodeType):
row[i] = eval(row[i], render_space)
row[i] = safe_eval(row[i], render_space)
row.insert(0, wanted)
return row

Expand Down