[
https://jira.jboss.org/browse/JBPM-2746?page=com.atlassian.jira.plugin.sy...
]
Alejandro Guizar commented on JBPM-2746:
----------------------------------------
Thanks for the patches Huisheng, I'll review them tomorrow. Decoding the string
through UTF-8 seems reasonable to me as well, it should be harmless. On the other hand,
completely eliminating the replacement of non-word characters is a disruptive change.
Instead, we could change the replacement regex "\W" to one that considers
non-latin letters and numbers; aomething like "[^\p{L}\p{N}]".
Broken NON-LATIN characters in project/node names/values during the
replication Process Definition to the DB
------------------------------------------------------------------------------------------------------------
Key: JBPM-2746
URL:
https://jira.jboss.org/browse/JBPM-2746
Project: jBPM
Issue Type: Patch
Security Level: Public(Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.3
Reporter: Konstantin Kasatkin
Assignee: Alejandro Guizar
Priority: Critical
Fix For: jBPM 4.4
Attachments: JBPM-2746-changed-pdkey.patch, JBPM-2746-not-change-pdkey.patch,
patch.zip
Original Estimate: 10 minutes
Remaining Estimate: 10 minutes
This issue is continuation of story described here
https://jira.jboss.org/jira/browse/GPD-384
Please apply our patch over the source code.
It fixes improper treatment with non-latin character encoding during rooming process
definition into DB.
Patch contains 2 modified classed from source code JBPM-4.2
Class StringStreamInput.java fixed by adding explicit encoding of source XML stream
"UTF-8"
public InputStream openStream() {
byte[] bytes = string.getBytes();
return new ByteArrayInputStream(bytes);
}
changed to
public InputStream openStream() {
try {
byte[] bytes = string.getBytes("UTF-8");
return new ByteArrayInputStream(bytes);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
throw new RuntimeException("Unsupported encoding UTF-8");
}
}
Method checkKey(...) in Class ProcessDeployer.java fixed by commenting unnecessary
replacing of non-latin characters to "_"
processDefinitionKey = processDefinitionName.replaceAll("\\W",
"_");
changed to
processDefinitionKey = processDefinitionName;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira