Repository navigation
[stable35] fix(docmdp): accept DSS and document timestamp updates after certification - #9694
Conversation
…ation ISO 32000-2 12.8.2.2.1 and ETSI EN 319 142-1 5.4 exempt incremental updates that only add a DSS dictionary (VRI, Certs, CRLs, OCSPs) or a document timestamp from DocMDP restrictions. The validation classified such an update as an unknown modification, so a certified document became invalid as soon as long-term validation data was added, at every DocMDP level. Before classifying the modification, parse the bytes after the certified revision strictly as incremental updates: indirect objects, a classic xref table listing exactly those objects at their offsets, a trailer whose /Root, /Info and /Prev match the certified revision and has no /Encrypt, and startxref. Xref streams, unlisted or unparsable bytes and object streams mean the update is not validation data only. The certified revision is read through its classic xref tables. New objects must use numbers from the certified /Size on. Of the existing objects, an update may only rewrite the catalog (/DSS, /Extensions, /Version), the AcroForm (/SigFlags, timestamp fields appended to /Fields), a page (timestamp fields appended to /Annots) and the information dictionary (/ModDate, /Producer). A new field must be an invisible document timestamp field (zero-area /Rect, no /Kids, /Parent, /A or /AA) whose value is a new /DocTimeStamp with /SubFilter /ETSI.RFC3161; any other new signature, field or annotation keeps the update a violation. Rewritten objects are compared in a canonical form (sorted keys, names with #xx escapes decoded, strings by their bytes, duplicate keys rejected, bounded nesting), since LTV tools rewrite the catalog and the information dictionary with their own formatting. Signed-off-by: no84by <50858621+no84by@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
fix(policy): keep group selector dropdown inside nested dialog Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> [skip ci]
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
|
Restored the complete DocMDP validation-data backport, preserved the stable branch APIs, removed the duplicate PDF fixture method, and restored the missing regression tests. The native signing/validation regression now runs in this stable branch's PHPUnit suite with isolated mocks. Local validation against the regenerated scoped validator and the stable branch's locked signer: 81 DocMDP tests (153 assertions) and 8 native signing/validation tests (167 assertions) passed. PHP lint also passed. The new application commit is signed and DCO-compliant. Merge dependency: LibreSign/3rdparty#168 (all dependency checks passed). This PR currently references that reviewed candidate's signed generated HEAD for integration testing. Merge the corresponding 3rdparty PR first and update this gitlink to the actual merged source commit; rerun application CI before merging. The application CI is running on the corrected HEAD. The original backport commits are retained; no history rewrite or test suppression was used. |
Backport of #9556
Warning, This backport's changes differ from the original and might be incomplete⚠️
Todo
Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.