Skip to content

ROB: Allow non-strict mode in more objects#794

Closed
MartinThoma wants to merge 2 commits intomainfrom
issue-360
Closed

ROB: Allow non-strict mode in more objects#794
MartinThoma wants to merge 2 commits intomainfrom
issue-360

Conversation

@MartinThoma
Copy link
Copy Markdown
Member

Closes #360

@MartinThoma MartinThoma added the is-robustness-issue From a users perspective, this is about robustness label Apr 22, 2022
Comment on lines +407 to +411
msg = r"Unexpected escaped string: %s" % tok
if strict:
raise PdfReadError(msg)
else:
logger.warning(msg)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the key part of the mentioned issue

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Merging #794 (b68c988) into main (d1be80d) will decrease coverage by 0.06%.
The diff coverage is 87.17%.

@@            Coverage Diff             @@
##             main     #794      +/-   ##
==========================================
- Coverage   75.24%   75.17%   -0.07%     
==========================================
  Files          11       11              
  Lines        3522     3525       +3     
  Branches      814      815       +1     
==========================================
  Hits         2650     2650              
- Misses        658      661       +3     
  Partials      214      214              
Impacted Files Coverage Δ
PyPDF2/generic.py 67.55% <80.00%> (-0.29%) ⬇️
PyPDF2/pdf.py 81.85% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d1be80d...b68c988. Read the comment docs.

MartinThoma added a commit that referenced this pull request Apr 28, 2022
An unexpected escape string was raising a PdfReadError before.
Now, only a warning is issued.

Closes #360
Closes #794 : Passing the strict parameter looks like a good idea,
              but there is also the pdf parameter. Sadly, it is
              None for that issue.
MartinThoma added a commit that referenced this pull request Apr 28, 2022
An unexpected escape string was raising a PdfReadError before.
Now, only a warning is issued.

Closes #360
Closes #794 : Passing the strict parameter looks like a good idea,
              but there is also the pdf parameter. Sadly, it is
              None for that issue.
MartinThoma added a commit that referenced this pull request Apr 28, 2022
An unexpected escape string was raising a PdfReadError before.
Now, only a warning is issued.

Closes #360
Closes #794 : Passing the strict parameter looks like a good idea,
              but there is also the pdf parameter. Sadly, it is
              None for that issue.
MartinThoma added a commit that referenced this pull request Apr 28, 2022
An unexpected escape string was raising a PdfReadError before.
Now, only a warning is issued.

Closes #360
Closes #794 : Passing the strict parameter looks like a good idea,
              but there is also the pdf parameter. Sadly, it is
              None for that issue.
VictorCarlquist pushed a commit to VictorCarlquist/PyPDF2 that referenced this pull request Apr 29, 2022
An unexpected escape string was raising a PdfReadError before.
Now, only a warning is issued.

Closes py-pdf#360
Closes py-pdf#794 : Passing the strict parameter looks like a good idea,
              but there is also the pdf parameter. Sadly, it is
              None for that issue.
@MartinThoma MartinThoma deleted the issue-360 branch May 1, 2022 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

is-robustness-issue From a users perspective, this is about robustness

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected escaped string for a valid PDF.

2 participants