Github user trixpan commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1692#discussion_r113587423
--- Diff:
nifi-nar-bundles/nifi-cybersecurity-bundle/nifi-cybersecurity-processors/src/main/java/org/apache/nifi/processors/cybersecurity/FuzzyHashContent.java
---
@@ -157,9 +138,11 @@ public void onTrigger(final ProcessContext context,
final ProcessSession session
}
final ComponentLog logger = getLogger();
+ String algorithm = context.getProperty(HASH_ALGORITHM).getValue();
// Check if content matches minimum length requirement
- if (context.getProperty(HASH_ALGORITHM).equals(allowableValueTLSH)
&& flowFile.getSize() < 512 ) {
+
+ if (checkMinimumAlgorithmRequirements(algorithm, flowFile) ==
false) {
logger.info("The content of {} is smaller than the minimum
required by TLSH, routing to failure", new Object[]{flowFile});
--- End diff --
fixed
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---