You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "exceptionfactory (via GitHub)" <gi...@apache.org> on 2023/10/30 22:16:54 UTC
[PR] NIFI-12294 Standardize NAR Entry Loading [nifi]
exceptionfactory opened a new pull request, #7958:
URL: https://github.com/apache/nifi/pull/7958
# Summary
[NIFI-12294](https://issues.apache.org/jira/browse/NIFI-12294) Updates the `NarUnpacker` to standardize loading of entries for NAR files, reducing duplicative naming normalization. Additional changes include updating the associated test class to reduce unnecessary parameter passing and method calls.
# Tracking
Please complete the following tracking steps prior to pull request creation.
### Issue Tracking
- [X] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created
### Pull Request Tracking
- [X] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000`
- [X] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-00000`
### Pull Request Formatting
- [X] Pull Request based on current revision of the `main` branch
- [X] Pull Request refers to a feature branch with one commit containing changes
# Verification
Please indicate the verification steps performed prior to pull request creation.
### Build
- [X] Build completed using `mvn clean install -P contrib-check`
- [X] JDK 21
### Licensing
- [ ] New dependencies are compatible with the [Apache License 2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License Policy](https://www.apache.org/legal/resolved.html)
- [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` files
### Documentation
- [ ] Documentation formatting appears as expected in rendered files
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12294 Standardize NAR Entry Loading [nifi]
Posted by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org>.
github-advanced-security[bot] commented on code in PR #7958:
URL: https://github.com/apache/nifi/pull/7958#discussion_r1376902545
##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-nar-utils/src/main/java/org/apache/nifi/nar/NarUnpacker.java:
##########
@@ -670,6 +659,16 @@
}
}
+ private static File getJarEntryFile(final File workingDirectory, final JarEntry jarEntry) {
+ final Path workingDirectoryPath = workingDirectory.toPath();
+ final String jarEntryName = jarEntry.getName().replace(BUNDLED_DEPENDENCIES_PREFIX, BUNDLED_DEPENDENCIES_DIRECTORY);
Review Comment:
## Arbitrary file access during archive extraction ("Zip Slip")
Unsanitized archive entry, which may contain '..', is used in a [file system operation](1).
Unsanitized archive entry, which may contain '..', is used in a [file system operation](2).
Unsanitized archive entry, which may contain '..', is used in a [file system operation](3).
Unsanitized archive entry, which may contain '..', is used in a [file system operation](4).
[Show more details](https://github.com/apache/nifi/security/code-scanning/57)
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12294 Standardize NAR Entry Loading [nifi]
Posted by "markap14 (via GitHub)" <gi...@apache.org>.
markap14 merged PR #7958:
URL: https://github.com/apache/nifi/pull/7958
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-12294 Standardize NAR Entry Loading [nifi]
Posted by "markap14 (via GitHub)" <gi...@apache.org>.
markap14 commented on PR #7958:
URL: https://github.com/apache/nifi/pull/7958#issuecomment-1789423117
Thanks for tackling that, @exceptionfactory. Looks like all tests (including system tests) are passing. Was able to startup with an existing work/ directory, and restart after deleting work/ directory and all appears to work as intended. Thanks for improving the code there! +1 will merge
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org