mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Mark Craig
27.19.2016 3d89790c48871c73c43bbe2849a68145da7256df
OPENDJ-3168 Escape XML content pushed into dsconfig property descriptions

This patch uses a Freemarker built-in to escape XML in properties descriptions
that come directly from server config XML.

The patch is fairly timid, mainly because a number of hand-written properties
include strings that use DocBook XML which should *not* be escaped.
7 files modified
15 ■■■■■ changed files
opendj-cli/pom.xml 2 ●●● patch | view | raw | blame | history
opendj-cli/src/main/resources/templates/dscfgVariableList.ftl 4 ●●●● patch | view | raw | blame | history
opendj-doc-generated-ref/pom.xml 1 ●●●● patch | view | raw | blame | history
opendj-doc-maven-plugin/pom.xml 2 ●●● patch | view | raw | blame | history
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LDAPPassThroughAuthenticationPolicyConfiguration.xml 3 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/pom.xml 2 ●●● patch | view | raw | blame | history
pom.xml 1 ●●●● patch | view | raw | blame | history
opendj-cli/pom.xml
@@ -56,7 +56,7 @@
        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
            <version>2.3.21</version>
            <version>${freemarker.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
opendj-cli/src/main/resources/templates/dscfgVariableList.ftl
@@ -11,7 +11,7 @@
 # Header, with the fields enclosed by brackets [] replaced by your own identifying
 # information: "Portions Copyright [year] [name of copyright owner]".
 #
 # Copyright 2015 ForgeRock AS.
 # Copyright 2015-2016 ForgeRock AS.
 #-->
<variablelist>
@@ -26,7 +26,7 @@
          <term>${property.descTitle}</term>
          <listitem>
            <para>
              ${property.description}
              ${property.description?xml}
            </para>
          </listitem>
        </varlistentry>
opendj-doc-generated-ref/pom.xml
@@ -32,7 +32,6 @@
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <freemarker.version>2.3.21</freemarker.version>
    </properties>
opendj-doc-maven-plugin/pom.xml
@@ -47,7 +47,7 @@
        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
            <version>2.3.21</version>
            <version>${freemarker.version}</version>
        </dependency>
        <dependency>
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LDAPPassThroughAuthenticationPolicyConfiguration.xml
@@ -384,6 +384,9 @@
      An example use-case for this property would be to use a different attribute type
      on the mapped search. For example, mapped-attribute could be set to "uid" and
      filter-template to "(samAccountName=%s)".
      You can also use the filter to restrict search results.
      For example: "(&amp;(uid=%s)(objectclass=student))"
    </adm:description>
    <adm:default-behavior>
      <adm:undefined/>
opendj-server-legacy/pom.xml
@@ -203,7 +203,7 @@
    <dependency>
      <groupId>org.freemarker</groupId>
      <artifactId>freemarker</artifactId>
      <version>2.3.21</version>
      <version>${freemarker.version}</version>
      <scope>test</scope>
    </dependency>
pom.xml
@@ -47,6 +47,7 @@
        <forgerock-build-tools.version>1.0.2</forgerock-build-tools.version>
        <forgerock-doc-plugin.version>3.2.0</forgerock-doc-plugin.version>
        <freemarker.version>2.3.24-incubating</freemarker.version>
        <grizzly-framework.version>2.3.24</grizzly-framework.version>
        <metrics-core.version>3.1.2</metrics-core.version>