NIFI-8417 emoji in processor group name cause nifi to not start up

- Excluded Xalan dependency from spring-security-saml2-core

This closes #5012

Signed-off-by: David Handermann <exceptionfactory@apache.org>
This commit is contained in:
s9514171 2021-05-04 14:18:43 +00:00 committed by exceptionfactory
parent 1645886e5a
commit 1791f4cc35
No known key found for this signature in database
GPG Key ID: 29B6A52D2AAE8DBA
2 changed files with 27 additions and 0 deletions

View File

@ -63,6 +63,8 @@ public class StandardFlowSerializerTest {
private static final String SERIALIZED_VARIABLE_NAME = "Name with escape needed";
private static final String RAW_VARIABLE_VALUE = "Value with \u0001 escape needed";
private static final String SERIALIZED_VARIABLE_VALUE = "Value with escape needed";
private static final String RAW_STRING_WITH_EMOJI = "String with \uD83D\uDCA7 droplet emoji";
private static final String SERIALIZED_STRING_WITH_EMOJI = "String with &#128167; droplet emoji";
private volatile String propsFile = StandardFlowSerializerTest.class.getResource("/standardflowserializertest.nifi.properties").getFile();
@ -128,4 +130,25 @@ public class StandardFlowSerializerTest {
assertFalse(serializedFlow.contains(RAW_VARIABLE_VALUE));
assertFalse(serializedFlow.contains("\u0001"));
}
@Test
public void testSerializationEmoji() throws Exception {
final ProcessorNode dummy = controller.getFlowManager().createProcessor(DummyScheduledProcessor.class.getName(),
UUID.randomUUID().toString(), systemBundle.getBundleDetails().getCoordinate());
dummy.setName(RAW_STRING_WITH_EMOJI);
controller.getFlowManager().getRootGroup().addProcessor(dummy);
controller.getFlowManager().getRootGroup().setVariables(Collections.singletonMap(RAW_STRING_WITH_EMOJI, RAW_STRING_WITH_EMOJI));
// serialize the controller
final ByteArrayOutputStream os = new ByteArrayOutputStream();
final Document doc = serializer.transform(controller, ScheduledStateLookup.IDENTITY_LOOKUP);
serializer.serialize(doc, os);
// verify the results contain the serialized string
final String serializedFlow = os.toString(StandardCharsets.UTF_8.name());
assertTrue(serializedFlow.contains(SERIALIZED_STRING_WITH_EMOJI));
assertFalse(serializedFlow.contains(RAW_STRING_WITH_EMOJI));
}
}

View File

@ -540,6 +540,10 @@
<groupId>com.io7m.xom</groupId>
<artifactId>xom</artifactId>
</exclusion>
<exclusion>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>