chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1718403 - in /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings: ./ src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/ src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/
Date Mon, 07 Dec 2015 15:29:08 GMT
Author: fmui
Date: Mon Dec  7 15:29:07 2015
New Revision: 1718403

URL: http://svn.apache.org/viewvc?rev=1718403&view=rev
Log:
Server: updated commons-lang

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/pom.xml
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/CmisAtomPubServlet.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/CmisWebServicesServlet.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/pom.xml
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/pom.xml?rev=1718403&r1=1718402&r2=1718403&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/pom.xml
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/pom.xml
Mon Dec  7 15:29:07 2015
@@ -71,9 +71,9 @@
             <version>${project.version}</version>
         </dependency>
         <dependency>
-            <groupId>commons-lang</groupId>
-            <artifactId>commons-lang</artifactId>
-            <version>2.6</version>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+            <version>3.4</version>
         </dependency>
         <dependency>
             <groupId>javax.servlet</groupId>

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/CmisAtomPubServlet.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/CmisAtomPubServlet.java?rev=1718403&r1=1718402&r2=1718403&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/CmisAtomPubServlet.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/CmisAtomPubServlet.java
Mon Dec  7 15:29:07 2015
@@ -85,7 +85,7 @@ import org.apache.chemistry.opencmis.ser
 import org.apache.chemistry.opencmis.server.shared.QueryStringHttpServletRequestWrapper;
 import org.apache.chemistry.opencmis.server.shared.ServiceCall;
 import org.apache.chemistry.opencmis.server.shared.TempStoreOutputStreamFactory;
-import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.commons.lang3.StringEscapeUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -359,7 +359,9 @@ public class CmisAtomPubServlet extends
                     + "BODY {font-family:Verdana,arial,sans-serif;color:black;font-size:14px;}
"
                     + "HR {color:#3c78b5;height:1px;}--></style></head><body>");
             pw.print("<h1>HTTP Status " + statusCode + " - <!--exception-->"
+ exceptionName + "<!--/exception--></h1>");
-            pw.print("<p><!--message-->" + StringEscapeUtils.escapeHtml(message)
+ "<!--/message--></p>");
+            pw.print("<p><!--message-->");
+            StringEscapeUtils.ESCAPE_HTML4.translate(message, pw);
+            pw.print("<!--/message--></p>");
 
             String st = ExceptionHelper.getStacktraceAsString(ex);
             if (st != null) {
@@ -372,8 +374,11 @@ public class CmisAtomPubServlet extends
                 if (additionalData != null && !additionalData.isEmpty()) {
                     pw.print("<hr noshade='noshade'/>Additional data:<br><br>");
                     for (Map.Entry<String, String> e : additionalData.entrySet()) {
-                        pw.print("<!--key-->" + StringEscapeUtils.escapeHtml(e.getKey())
+ "<!--/key--> = <!--value-->"
-                                + StringEscapeUtils.escapeHtml(e.getValue()) + "<!--/value--><br>");
+                        pw.print("<!--key-->");
+                        StringEscapeUtils.ESCAPE_HTML4.translate(e.getKey(), pw);
+                        pw.print("<!--/key--> = <!--value-->");
+                        StringEscapeUtils.ESCAPE_HTML4.translate(e.getValue(), pw);
+                        pw.print("<!--/value--><br>");
                     }
                 }
             }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/CmisWebServicesServlet.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/CmisWebServicesServlet.java?rev=1718403&r1=1718402&r2=1718403&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/CmisWebServicesServlet.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/webservices/CmisWebServicesServlet.java
Mon Dec  7 15:29:07 2015
@@ -41,7 +41,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.server.impl.CmisRepositoryContextListener;
 import org.apache.chemistry.opencmis.server.shared.CsrfManager;
 import org.apache.chemistry.opencmis.server.shared.Dispatcher;
-import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.commons.lang3.StringEscapeUtils;
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.transport.servlet.CXFServlet;
@@ -189,8 +189,8 @@ public class CmisWebServicesServlet exte
         response.setContentType("text/html");
         response.setCharacterEncoding(IOUtils.UTF8);
 
-        String urlEscaped = StringEscapeUtils.escapeHtml((new UrlBuilder(baseUrl)).addPath("cmis").addParameter("wsdl")
-                .toString());
+        String urlEscaped = StringEscapeUtils.escapeHtml4((new UrlBuilder(baseUrl)).addPath("cmis")
+                .addParameter("wsdl").toString());
 
         PrintWriter pw = response.getWriter();
 
@@ -215,7 +215,7 @@ public class CmisWebServicesServlet exte
 
         PrintWriter pw = response.getWriter();
 
-        String messageEscaped = StringEscapeUtils.escapeXml(message);
+        String messageEscaped = StringEscapeUtils.escapeXml10(message);
 
         pw.println("<?xml version='1.0' encoding='UTF-8'?>");
         pw.println("<S:Envelope xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\">");



Mime
View raw message