tanvir-ux opened a new pull request, #810:
URL: https://github.com/apache/commons-compress/pull/810

   ## Summary
   Fixes [COMPRESS-725](https://issues.apache.org/jira/browse/COMPRESS-725).
   
   The class-level \"Decompressing a ZIP-File\" example in 
`ArchiveStreamFactory` used:
   
   ```java
   Files.newOutputStream(dir.toPath().resolve(entry.getName()))
   ```
   
   That pattern is vulnerable to Zip Slip if copied into application code. 
Commons Compress already provides `ArchiveEntry.resolveIn(Path)` (since 1.26.0) 
as the safe extraction helper used by `Expander`.
   
   This PR updates the example to:
   
   ```java
   Files.newOutputStream(entry.resolveIn(dir.toPath()))
   ```
   
   Documentation-only; no behavioral change.
   
   ## Testing
   - Doc-only change in class Javadoc.


-- 
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]

Reply via email to