[
https://issues.apache.org/jira/browse/NIFI-5266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16502022#comment-16502022
]
ASF GitHub Bot commented on NIFI-5266:
--------------------------------------
Github user ottobackwards commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2760#discussion_r193132253
--- Diff:
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchHttp.java
---
@@ -227,7 +226,10 @@ public void onTrigger(final ProcessContext context,
final ProcessSession session
List<FlowFile> flowFilesToTransfer = new LinkedList<>(flowFiles);
final StringBuilder sb = new StringBuilder();
- final String baseUrl =
trimToEmpty(context.getProperty(ES_URL).evaluateAttributeExpressions().getValue());
+ final String baseUrl =
context.getProperty(ES_URL).evaluateAttributeExpressions().getValue().trim();
+ if (StringUtils.isEmpty(baseUrl)) {
--- End diff --
if baseUrl is empty should the exception message be that "Elasticsearch URL
evaluates to empty" or something? Your message is always going to be "... not
valid: " since baseUrl will be empty.
> PutElasticsearchHttp processors should sanitize parameters
> ----------------------------------------------------------
>
> Key: NIFI-5266
> URL: https://issues.apache.org/jira/browse/NIFI-5266
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Extensions
> Reporter: Matt Burgess
> Assignee: Matt Burgess
> Priority: Major
>
> Currently PutElasticsearchHttp and PutElasticsearchHttpRecord put the
> property values for index, type, and id into the Bulk API command as they are
> specified in the processor properties. This can cause errors when special
> characters such as a double-quote (") is encountered. Although a double-quote
> (for example) is not supported in an index name, it is valid in a type name
> and should be allowed.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)