exceptionfactory commented on code in PR #6367:
URL: https://github.com/apache/nifi/pull/6367#discussion_r963636069
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ExecuteStreamCommand.java:
##########
@@ -419,14 +420,21 @@ public void onTrigger(ProcessContext context, final
ProcessSession session) thro
}
return 0;
});
- for ( final PropertyDescriptor descriptor : propertyDescriptors) {
-
args.add(context.getProperty(descriptor.getName()).evaluateAttributeExpressions(inputFlowFile).getValue());
+ for (final PropertyDescriptor descriptor : propertyDescriptors) {
+ if (descriptor.isSensitive()) {
+ String value =
context.getProperty(descriptor.getName()).evaluateAttributeExpressions(inputFlowFile).getValue();
+ String maskedValue = IntStream.rangeClosed(0,
value.length()).mapToObj(i -> "*").collect(Collectors.joining());
Review Comment:
Following the example of masked values elsewhere in the application, it
would seems better to use a static-length string.
--
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]