[
https://issues.apache.org/jira/browse/NIFI-1915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15298173#comment-15298173
]
ASF GitHub Bot commented on NIFI-1915:
--------------------------------------
GitHub user olegz opened a pull request:
https://github.com/apache/nifi/pull/463
NIFI-1915 Fixed '$' escape logic.
Fixed '$' escape logic (if not followed by number) to use
Matcher.quoteReplacement(java.lang.String) to
suppress its special meaning so it could be treated as literal.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/olegz/nifi NIFI-1915
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/nifi/pull/463.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #463
----
commit 0d436e64348488156bc4f7c313d97aee06813501
Author: Oleg Zhurakousky <[email protected]>
Date: 2016-05-24T13:30:51Z
NIFI-1915 Fixed '$' escape logic.
Fixed '$' escape logic (if not followed by number) to use
Matcher.quoteReplacement(java.lang.String) to
suppress its special meaning so it could be treated as literal.
----
> ReplaceText infinite loops when attribute contains $ sign
> ---------------------------------------------------------
>
> Key: NIFI-1915
> URL: https://issues.apache.org/jira/browse/NIFI-1915
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 0.6.1
> Reporter: Stephane Maarek
> Assignee: Oleg Zhurakousky
> Priority: Critical
> Fix For: 1.0.0, 0.7.0
>
>
> I think the biggest issue is that the text inside of an attribute isn't
> properly escaped when written to a String, which brings conflict when the
> text contains dollar signs ($)
> That's a big roadblock for me as I can't predict if and when some $ signs may
> be present in the data
> An easy way to reproduce is to take the csv to json template here:
> https://cwiki.apache.org/confluence/download/attachments/57904847/CsvToJSON.xml?version=1&modificationDate=1442927496000&api=v2
>
> In the first ReplaceText, replace a,b,c,d by a$a,b,c,d (it simulates data
> that may or may not contain a $ sign)
> Launch the flow, you'll see the errors / warning / infinite loop
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)