This is an automated email from the ASF dual-hosted git repository. ilgrosso pushed a commit to branch 3_0_X in repository https://gitbox.apache.org/repos/asf/syncope.git
commit ad14ce6caa4020f9670554f42c7469b41e9edded Author: Francesco Chicchiriccò <ilgro...@apache.org> AuthorDate: Tue Feb 7 08:54:44 2023 +0100 Escaping XML entities when bootstraping from Content.xml --- .../syncope/core/persistence/jpa/content/ContentLoaderHandler.java | 2 ++ .../org/apache/syncope/core/persistence/jpa/entity/JPAApplication.java | 1 - .../java/org/apache/syncope/core/provisioning/api/WorkflowResult.java | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/ContentLoaderHandler.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/ContentLoaderHandler.java index f07957abef..83e408cab9 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/ContentLoaderHandler.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/content/ContentLoaderHandler.java @@ -26,6 +26,7 @@ import java.util.Objects; import javax.sql.DataSource; import javax.xml.bind.DatatypeConverter; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.text.StringEscapeUtils; import org.apache.commons.text.StringSubstitutor; import org.apache.syncope.core.provisioning.api.utils.FormatUtils; import org.slf4j.Logger; @@ -92,6 +93,7 @@ public class ContentLoaderHandler extends DefaultHandler { LOG.warn("Variable ${} could not be resolved", attrs.getValue(i)); value = attrs.getValue(i); } + value = StringEscapeUtils.unescapeXml(value); switch (colType) { case Types.INTEGER: diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPAApplication.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPAApplication.java index 756ce12ce6..1f65267a5c 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPAApplication.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPAApplication.java @@ -69,5 +69,4 @@ public class JPAApplication extends AbstractProvidedKeyEntity implements Applica public List<? extends Privilege> getPrivileges() { return privileges; } - } diff --git a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/WorkflowResult.java b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/WorkflowResult.java index 335b0fb2dd..37b84d0912 100644 --- a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/WorkflowResult.java +++ b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/WorkflowResult.java @@ -28,7 +28,7 @@ public class WorkflowResult<T> { private T result; - private PropagationByResource<String> propByRes; + private final PropagationByResource<String> propByRes; private final Set<String> performedTasks = new HashSet<>();