chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1788278 - in /chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/report: JsonReport.java TextReport.java XmlReport.java
Date Thu, 23 Mar 2017 16:26:33 GMT
Author: fmui
Date: Thu Mar 23 16:26:33 2017
New Revision: 1788278

URL: http://svn.apache.org/viewvc?rev=1788278&view=rev
Log:
TCK: hide password in reports

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/report/JsonReport.java
    chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/report/TextReport.java
    chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/report/XmlReport.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/report/JsonReport.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/report/JsonReport.java?rev=1788278&r1=1788277&r2=1788278&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/report/JsonReport.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/report/JsonReport.java
Thu Mar 23 16:26:33 2017
@@ -26,6 +26,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
 
+import org.apache.chemistry.opencmis.commons.SessionParameter;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisBaseException;
 import org.apache.chemistry.opencmis.commons.impl.json.JSONArray;
 import org.apache.chemistry.opencmis.commons.impl.json.JSONObject;
@@ -53,7 +54,12 @@ public class JsonReport extends Abstract
 
         if (parameters != null) {
             for (Map.Entry<String, String> p : (new TreeMap<String, String>(parameters)).entrySet())
{
-                jsonParameters.put(p.getKey(), p.getValue());
+                String value = p.getValue();
+                if (SessionParameter.PASSWORD.endsWith(p.getKey())) {
+                    value = "*****";
+                }
+
+                jsonParameters.put(p.getKey(), value);
             }
         }
 

Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/report/TextReport.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/report/TextReport.java?rev=1788278&r1=1788277&r2=1788278&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/report/TextReport.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/report/TextReport.java
Thu Mar 23 16:26:33 2017
@@ -26,6 +26,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
 
+import org.apache.chemistry.opencmis.commons.SessionParameter;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisBaseException;
 import org.apache.chemistry.opencmis.tck.CmisTest;
 import org.apache.chemistry.opencmis.tck.CmisTestGroup;
@@ -50,7 +51,12 @@ public class TextReport extends Abstract
         writer.write("***************************************************************" +
NL);
         if (parameters != null) {
             for (Map.Entry<String, String> p : (new TreeMap<String, String>(parameters)).entrySet())
{
-                writer.write(p.getKey() + " = " + p.getValue() + NL);
+                String value = p.getValue();
+                if (SessionParameter.PASSWORD.endsWith(p.getKey())) {
+                    value = "*****";
+                }
+
+                writer.write(p.getKey() + " = " + value + NL);
             }
         }
         writer.write("***************************************************************" +
NL);

Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/report/XmlReport.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/report/XmlReport.java?rev=1788278&r1=1788277&r2=1788278&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/report/XmlReport.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/report/XmlReport.java
Thu Mar 23 16:26:33 2017
@@ -26,6 +26,7 @@ import java.util.TreeMap;
 import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamWriter;
 
+import org.apache.chemistry.opencmis.commons.SessionParameter;
 import org.apache.chemistry.opencmis.tck.CmisTest;
 import org.apache.chemistry.opencmis.tck.CmisTestGroup;
 import org.apache.chemistry.opencmis.tck.CmisTestResult;
@@ -68,8 +69,14 @@ public class XmlReport extends AbstractC
             for (Map.Entry<String, String> p : (new TreeMap<String, String>(parameters)).entrySet())
{
                 xml.writeStartElement(TAG_PARAMETER);
                 xml.writeAttribute(ATTR_KEY, p.getKey());
-                if (p.getValue() != null) {
-                    xml.writeAttribute(ATTR_VALUE, p.getValue());
+
+                String value = p.getValue();
+                if (SessionParameter.PASSWORD.endsWith(p.getKey())) {
+                    value = "*****";
+                }
+
+                if (value != null) {
+                    xml.writeAttribute(ATTR_VALUE, value);
                 }
                 xml.writeEndElement();
             }



Mime
View raw message