From 3d89790c48871c73c43bbe2849a68145da7256df Mon Sep 17 00:00:00 2001
From: Mark Craig <mark.craig@forgerock.com>
Date: Mon, 27 Jun 2016 10:35:44 +0000
Subject: [PATCH] OPENDJ-3168 Escape XML content pushed into dsconfig property descriptions

---
 opendj-server-legacy/pom.xml                                                                                                              |    2 +-
 opendj-doc-generated-ref/pom.xml                                                                                                          |    1 -
 opendj-cli/src/main/resources/templates/dscfgVariableList.ftl                                                                             |    4 ++--
 pom.xml                                                                                                                                   |    1 +
 opendj-doc-maven-plugin/pom.xml                                                                                                           |    2 +-
 opendj-cli/pom.xml                                                                                                                        |    2 +-
 opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LDAPPassThroughAuthenticationPolicyConfiguration.xml |    3 +++
 7 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/opendj-cli/pom.xml b/opendj-cli/pom.xml
index 8d08247..58e4613 100644
--- a/opendj-cli/pom.xml
+++ b/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>
diff --git a/opendj-cli/src/main/resources/templates/dscfgVariableList.ftl b/opendj-cli/src/main/resources/templates/dscfgVariableList.ftl
index 79cf12a..192ca8c 100644
--- a/opendj-cli/src/main/resources/templates/dscfgVariableList.ftl
+++ b/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>
diff --git a/opendj-doc-generated-ref/pom.xml b/opendj-doc-generated-ref/pom.xml
index 361ea9f..53f2290 100644
--- a/opendj-doc-generated-ref/pom.xml
+++ b/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>
 
 
diff --git a/opendj-doc-maven-plugin/pom.xml b/opendj-doc-maven-plugin/pom.xml
index b8ed03c..d370e43 100644
--- a/opendj-doc-maven-plugin/pom.xml
+++ b/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>
diff --git a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LDAPPassThroughAuthenticationPolicyConfiguration.xml b/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LDAPPassThroughAuthenticationPolicyConfiguration.xml
index 4ba1e61..3e46b2c 100644
--- a/opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/LDAPPassThroughAuthenticationPolicyConfiguration.xml
+++ b/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/>
diff --git a/opendj-server-legacy/pom.xml b/opendj-server-legacy/pom.xml
index 0348073..5225796 100644
--- a/opendj-server-legacy/pom.xml
+++ b/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>
 
diff --git a/pom.xml b/pom.xml
index d988dff..5afd77b 100644
--- a/pom.xml
+++ b/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>
 

--
Gitblit v1.10.0