Andrew Mathis created NIFI-6186:
-----------------------------------

             Summary: JythonScriptEngineConfigurator fails to account for 
Python escaping in Module Directory property
                 Key: NIFI-6186
                 URL: https://issues.apache.org/jira/browse/NIFI-6186
             Project: Apache NiFi
          Issue Type: Bug
          Components: Extensions
    Affects Versions: 1.9.1, 1.9.0, 1.7.1, 1.8.0, 1.7.0, 1.6.0, 1.5.0, 0.7.4, 
1.4.0, 1.3.0, 1.0.1, 1.1.1, 1.2.0, 0.7.1, 1.1.0, 0.6.1, 0.7.0, 0.5.1, 0.6.0, 
0.5.0, 1.0.0, 0.8.0, 1.9.2
            Reporter: Andrew Mathis


Currently, JythonScriptEngineConfigurator (in its init() method) incorporates 
the module directory list (as derived from the Module Directory property value) 
into evaluated Jython code as string literals without any regard to how the 
paths will be interpreted in Jython. This means that Module Directory paths 
that include Jython escape sequences (e.g. "\a", "\1") will be mis-interpreted 
in Jython execution. Rather than interpreting paths directly as Python string 
literals, a method like PyString.encode_UnicodeEscape should be used to 
translate the Java strings into appropriate Jython string literals.

This issue will be especially relevant in Windows, where paths will often 
contain backslashes.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to