Repository navigation
fix(docmdp): ignore orphaned signatures in revision summary - #9667
vitormattos wants to merge 2 commits into
Conversation
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Code Metrics ReportNote: Metrics describe the revision analyzed by the successful PHPUnit run. Newer commits with pending, canceled or failed checks may not yet be represented in this report.
Details | | main (878d2bf) | #9667 (0fe850e) | +/- |
|---------------------|----------------|-----------------|--------|
| Coverage | 78.1% | 78.1% | 0.0% |
| Files | 537 | 537 | 0 |
| Lines | 29818 | 29818 | 0 |
| Covered | 23303 | 23303 | 0 |
- | Test Execution Time | 3m52s | 5m43s | +1m51s |Reported by octocov |
lfals
left a comment
There was a problem hiding this comment.
When the signature inventory is conclusive and reports no active signatures, the revision summary now returns zero revisions, no modifications and no details. Orphaned /Sig dictionaries no longer produce a revision count.
Two gaps remain: the new tests do not prove the modified part of the fix, and PDFs with an active signature plus an orphan still go through the regex path.
The active-signature inventory implementation is already on main via #9556. Remove the superseded revision-count shortcut and cover orphan-only and mixed active-certification scenarios with real incremental revisions. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
lfals
left a comment
There was a problem hiding this comment.
The title and description still describe a production fix, but the diff is test-only (the fix is already on main via #9556):
fix(docmdp)lands under Fixed in the changelog.- The body says the handler now returns zero signed revisions, but no
lib/change is in the diff. - The body says
testOnlyReferencedSignatureDictionariesCertifywas strengthened, but that test is unchanged.
Please retitle to test(docmdp): cover orphaned signatures across revisions and rewrite the body to describe the two new test cases.
Problem
After integrating
pdf-signature-validator0.6.0, the structural inventory ignores unreferenced/Sigdictionaries when deciding whether a document is certified or signed. The DocMDP revision summary still counted their/ByteRangewith a broad regex, resulting in contradictory reported revision counts for structurally conclusive unsigned documents.Change
DocMdpHandlerTest::testOnlyReferencedSignatureDictionariesCertifyfor both orphan and referenced controls.Validation
PdfSignatureInventoryReaderAPI.Related to #9271 and the post-merge review of #9436. Does not supersede #9556 (DSS/document timestamps).