alopresto commented on a change in pull request #4572:
URL: https://github.com/apache/nifi/pull/4572#discussion_r499959894
##########
File path:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestUnpackContent.java
##########
@@ -450,4 +465,43 @@ public void testThreadSafetyUsingAutoDetect() throws
IOException {
runner.assertTransferCount(UnpackContent.REL_SUCCESS, numThreads*2);
}
+
+ private void runZipEncryptionMethod(final EncryptionMethod
encryptionMethod) throws IOException {
+ final TestRunner runner = TestRunners.newTestRunner(new
UnpackContent());
+ runner.setProperty(UnpackContent.PACKAGING_FORMAT,
UnpackContent.PackageFormat.ZIP_FORMAT.toString());
+
+ final String password = String.class.getSimpleName();
+ runner.setProperty(UnpackContent.PASSWORD, password);
+
+ final char[] streamPassword = password.toCharArray();
Review comment:
What happens in these scenarios:
* A legitimate password is set on the encrypted archive but none is provided
to the processor?
* No password is set on the archive but one is provided to the processor?
* A password exceeding the maximum length is provided (i.e. what is the max
length of the library's support for passwords)?
* A password with non-UTF-8/16 characters is provided? I think [Java 8
`Character`](https://docs.oracle.com/javase/8/docs/api/java/lang/Character.html)
will have trouble with UTF-32 chars, although the String entry also shouldn't
allow them.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]