Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Binh
erp5
Commits
5a20f582
Commit
5a20f582
authored
9 years ago
by
Jérome Perrin
Browse files
Options
Download
Email Patches
Plain Diff
deferred_style: encode data in bz2, zlib can overflow
parent
4845d50a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/Base_renderReportSection.xml
...ins/erp5_deferred_style_core/Base_renderReportSection.xml
+1
-1
bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/Base_report.xml
...tem/portal_skins/erp5_deferred_style_core/Base_report.xml
+8
-1
No files found.
bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/Base_renderReportSection.xml
View file @
5a20f582
...
...
@@ -77,7 +77,7 @@ with portal.Localizer.translationContext(localizer_language):\n
\n
report_section.popReport(portal, render_prefix=render_prefix)\n
\n
return report_section_idx, data.encode(\'utf8\').encode(\'
zlib
\')\n
return report_section_idx, data.encode(\'utf8\').encode(\'
bz2
\')\n
</string>
</value>
</item>
<item>
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_deferred_style/SkinTemplateItem/portal_skins/erp5_deferred_style_core/Base_report.xml
View file @
5a20f582
...
...
@@ -68,10 +68,17 @@ with portal.Localizer.translationContext(localizer_language):\n
\n
def dummyReportMethod():\n
return report_section_list\n
\n
def decodeReportSection(data):\n
# BBB We use to encode in zlib\n
try:\n
return data.decode(\'bz2\')\n
except IOError:\n
return data.decode(\'zlib\')\n
\n
report_data = context.restrictedTraverse(form_path).report_view.pt_render(\n
extra_context=dict(options={\'format\': format},\n
rendered_report_item_list=(
r[1].
decode
(\'zlib\'
) for r in report_section_list),\n
rendered_report_item_list=(decode
ReportSection(r[1]
) for r in report_section_list),\n
report_method=dummyReportMethod,\n
form=portal.restrictedTraverse(form_path)))\n
\n
...
...
This diff is collapsed.
Click to expand it.
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