naruto-lgtm commented on PR #1595:
URL: https://github.com/apache/poi/pull/1595#issuecomment-7254597089

   On the signature origin point from your review: confirmed. 
`OPCPackage.getPart(PackageRelationship)` matches on the relationship *type* 
and returns the first match, so with two origin parts both relationships 
resolved to origin.sigs and the signatures under the second origin were never 
reached. Since the method now promises all of them, I fixed it here rather than 
leaving it: the iterator resolves each origin relationship by its own target 
against the package root, and treats an origin it can't resolve the same as an 
unresolvable signature. `testSignatureUnderSecondOriginIsValidated` adds a 
second origin whose only signature has a changed reference digest; the per-part 
results were `[true, true]` before and are `[true, false]` now.
   
   I left `OPCPackage.getPart(PackageRelationship)` itself alone. It's wrong 
for every caller, but that's a separate change with a much wider blast radius.
   
   All four points are addressed in the pushed commit. 57 tests in 
`org.apache.poi.poifs.crypt.dsig.*` pass, including `testMultiSign` and the 
signed samples, and javadoc builds clean.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to