Skip to content

Conversation

@jrihtarsic
Copy link
Contributor

This pull request includes Resource management enhancements of the inputOctetStreamProxy in the XMLSignatureInput class, to mitigate the issue described in [SATUARIO-622].

  • src/main/java/org/apache/xml/security/signature/XMLSignatureInput.java: Modified the updateOutputStream method to use a BufferedInputStream for more efficient reading and added a debug log statement for when the input stream is closed. ([src/main/java/org/apache/xml/security/signature/XMLSignatureInput.javaL502-R512](https://github.com/apache/santuario-xml-security-java/pull/406/files#diff-6d3709a5ea6ec527779c8766e2a086461d2ae16bf549f024ff0fbfd9886f4e41L502-R512))
  • src/main/java/org/apache/xml/security/signature/XMLSignatureInput.java: Ensured the input stream is properly closed and the inputOctetStreamProxy reference is removed after reading. ([src/main/java/org/apache/xml/security/signature/XMLSignatureInput.javaL502-R512](https://github.com/apache/santuario-xml-security-java/pull/406/files#diff-6d3709a5ea6ec527779c8766e2a086461d2ae16bf549f024ff0fbfd9886f4e41L502-R512))

Copy link
Member

@seanjmullan seanjmullan left a comment

Choose a reason for hiding this comment

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

I don't think you really need the debug statement. Otherwise, looks good.

@jrihtarsic
Copy link
Contributor Author

The debug statement is now removed.

@coheigea coheigea merged commit bb63de9 into apache:3.0.x-fixes Nov 25, 2024
coheigea pushed a commit that referenced this pull request Dec 17, 2024
* [SANTUARIO-622] XMLSignatureInput close input stream

* PR update: remove the unnecessary debug statement

---------

Co-authored-by: RIHTARSIC Joze <joze.rihtarsic@ext.ec.europa.eu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants