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

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

Github user alopresto commented on the issue:

    https://github.com/apache/nifi/pull/1784
  
    Is there any scenario in which these characters are valid and necessary? I 
can understand not needing them in labels, component names, etc., but how are 
they handled if entered into a text field for a processor property that needs 
them (i.e. byte boundary searching, control characters, etc.)? An alternative 
to just dropping the illegal characters completely is to Base64 encode them for 
serialization to (GZIP) XML and then decode on deserialization. This would 
result in no data loss. 
    
    I was able to verify that entering the Unicode escape characters through 
the UI successfully escaped them, but I was then able to modify the 
`flow.xml.gz` file on disk and manually insert invalid characters (see 
screenshots). On startup, the app still throws an exception in the stack trace. 
This is to be expected, but can we improve the verbosity of the error output?
    
    <img width="1067" alt="screen shot 2017-05-15 at 6 46 10 pm" 
src="https://cloud.githubusercontent.com/assets/798465/26086380/1a73ce8c-399f-11e7-82bd-a8ef88b1bd77.png";>
    <img width="1072" alt="screen shot 2017-05-15 at 6 43 46 pm" 
src="https://cloud.githubusercontent.com/assets/798465/26086378/1a6fa744-399f-11e7-811b-07ad02116f54.png";>
    <img width="1049" alt="screen shot 2017-05-15 at 6 43 19 pm" 
src="https://cloud.githubusercontent.com/assets/798465/26086381/1a7584d4-399f-11e7-981d-aca335873b23.png";>
    <img width="1920" alt="screen shot 2017-05-15 at 6 36 18 pm" 
src="https://cloud.githubusercontent.com/assets/798465/26086379/1a700298-399f-11e7-8679-bedb37bf9e6e.png";>
    



> Escape configurations prior to writing flow.xml
> -----------------------------------------------
>
>                 Key: NIFI-3853
>                 URL: https://issues.apache.org/jira/browse/NIFI-3853
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>            Reporter: Matt Gilman
>            Assignee: Matt Gilman
>            Priority: Critical
>             Fix For: 1.3.0
>
>
> If invalid characters are entered through the UI, they can corrupt the 
> flow.xml.gz making it unparsable on future restarts. Once in this state, the 
> flow.xml.gz needs to be hand-edited to remove the invalid characters. 
> Characters outside the following ranges may cause issues:
> {code}
> #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
> {code}



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

Reply via email to