chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1848846 - /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/RepositoryService.java
Date Thu, 13 Dec 2018 13:13:30 GMT
Author: fmui
Date: Thu Dec 13 13:13:30 2018
New Revision: 1848846

URL: http://svn.apache.org/viewvc?rev=1848846&view=rev
Log:
fixed handling of invalid cookie values

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/RepositoryService.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/RepositoryService.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/browser/RepositoryService.java?rev=1848846&r1=1848845&r2=1848846&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/RepositoryService.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/RepositoryService.java
Thu Dec 13 13:13:30 2018
@@ -158,7 +158,10 @@ public class RepositoryService {
                     cookieValue = createCookieValue(0, null, CmisInvalidArgumentException.EXCEPTION_NAME,
                             "Unknown transaction!");
                 } else {
-                    JSONValue.parse(cookieValue);
+                    if (!(JSONValue.parse(cookieValue) instanceof JSONObject)) {
+                        cookieValue = createCookieValue(0, null, CmisInvalidArgumentException.EXCEPTION_NAME,
+                                "Invalid cookie value!");
+                    }
                 }
             } catch (Exception pe) {
                 cookieValue = createCookieValue(0, null, CmisRuntimeException.EXCEPTION_NAME,
"Cookie pasring error!");



Mime
View raw message