MatthiasValvekens / pyHanko

pyHanko: sign and stamp PDF files
MIT License
483 stars 71 forks source link

Tolerate missing `D:` in date strings #296

Closed MatthiasValvekens closed 1 year ago

MatthiasValvekens commented 1 year ago

Fixes #292

Description of the changes

In nonstrict mode, we allow PDF date strings without the D: prefix.

Checklist

Please go over this checklist to increase the chances of your PR being worked on in a timely manner. Deviations are allowed with proper justification (see previous section).

For bug fixes (delete if not applicable)

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (28f35f4) 98.76% compared to head (216066c) 98.76%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #296 +/- ## ======================================= Coverage 98.76% 98.76% ======================================= Files 104 104 Lines 14711 14712 +1 ======================================= + Hits 14529 14530 +1 Misses 182 182 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `98.76% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthias+Valvekens#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files Changed](https://app.codecov.io/gh/MatthiasValvekens/pyHanko/pull/296?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthias+Valvekens) | Coverage Δ | | |---|---|---| | [pyhanko/pdf\_utils/generic.py](https://app.codecov.io/gh/MatthiasValvekens/pyHanko/pull/296?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthias+Valvekens#diff-cHloYW5rby9wZGZfdXRpbHMvZ2VuZXJpYy5weQ==) | `100.00% <100.00%> (ø)` | | | [pyhanko/pdf\_utils/metadata/info.py](https://app.codecov.io/gh/MatthiasValvekens/pyHanko/pull/296?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthias+Valvekens#diff-cHloYW5rby9wZGZfdXRpbHMvbWV0YWRhdGEvaW5mby5weQ==) | `100.00% <100.00%> (ø)` | | | [pyhanko/pdf\_utils/reader.py](https://app.codecov.io/gh/MatthiasValvekens/pyHanko/pull/296?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthias+Valvekens#diff-cHloYW5rby9wZGZfdXRpbHMvcmVhZGVyLnB5) | `98.85% <100.00%> (ø)` | | | [pyhanko/sign/validation/pdf\_embedded.py](https://app.codecov.io/gh/MatthiasValvekens/pyHanko/pull/296?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthias+Valvekens#diff-cHloYW5rby9zaWduL3ZhbGlkYXRpb24vcGRmX2VtYmVkZGVkLnB5) | `98.88% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.