Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alecs_myu
erp5
Commits
5a20f582
Commit
5a20f582
authored
Apr 13, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
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>
...
...
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=(
decodeReportSection(r[1]
) for r in report_section_list),\n
report_method=dummyReportMethod,\n
form=portal.restrictedTraverse(form_path)))\n
\n
...
...
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