odoo/odoo#237396
Created by fw-bot
Merged
at 78c384c56bd8a5c59ffb38cb865c12f3d17cbf56
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: Contact runbot team on discord for help.
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:saas-18.4-17.0-opw-5142961-fix-agr-479924-fw
- head
- b8dd4e560f07a1d27e186747f3f8e0bca54ab5d4
- merged
- 4 months ago by Bugfix, Andrea Grazioso (agr)
| odoo/odoo | |
|---|---|
| 17.0 | #234587 |
| 18.0 | #237310 |
| saas-18.2 | #237341 |
| saas-18.3 | #237366 |
| saas-18.4 | #237396 |
| 19.0 | #237422 |
| saas-19.1 | |
| saas-19.2 | |
| master | #237450 |
[FIX] base: prevent traceback when merging malformed pdfs
Currently some PDFs cause error in PyPDF (Version 1 and 2) and cannot be merged.
Steps to reproduce:
- Create 2+ Bills with specific PDF (example found in ticket)
- From Bills list view, select both and click Download > Original bills
Issue:
Traceback will raise
PyPDF2.errors.PdfReadError: Can't read object stream: Stream has ended unexpectedly
Thsi occurs because the version of PyPDF currently in use (2.12.1) cannot recover when working an odd PDF file having wrong length markers.
This commit will add a nice error explaining to user what's going on.
Forward-Port-Of: #234587