[ 
https://issues.apache.org/jira/browse/NIFI-3726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15985749#comment-15985749
 ] 

ASF GitHub Bot commented on NIFI-3726:
--------------------------------------

Github user alopresto commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1692#discussion_r113586981
  
    --- 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 --
    
    Use the value of `algorithm` instead of hardcoded **TLSH** in the message. 


> Create FuzzyHash comparison processor
> -------------------------------------
>
>                 Key: NIFI-3726
>                 URL: https://issues.apache.org/jira/browse/NIFI-3726
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Andre F de Miranda
>            Assignee: Andre F de Miranda
>
> Now that NiFi cyber-security package supports "Fuzzy Hashing" it may be a 
> good idea to support a processor that makes use of it for comparison and 
> routing of matches



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to