brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #214: BROOKLYN-305: handle invalid xml chars in...
Date Thu, 23 Jun 2016 09:25:54 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/214#discussion_r68202480
  
    --- Diff: core/src/main/java/org/apache/brooklyn/core/mgmt/persist/BrooklynMementoPersisterToObjectStore.java
---
    @@ -294,7 +294,7 @@ public void visit(BrooklynObjectType type, String id, String contentsSubpath)
th
                         exceptionHandler.onLoadMementoFailed(type, "memento "+id+" read error",
e);
                     }
                     
    -                String xmlId = (String) XmlUtil.xpath(contents, "/"+type.toCamelCase()+"/id");
    +                String xmlId = (String) XmlUtil.xpathHandlingIllegalChars(contents, "/"+type.toCamelCase()+"/id");
    --- End diff --
    
    We're making the assumption that the `id` field etc won't have crazy characters in it
(because the Brooklyn framework generates those ids). The place we can get crazy characters
is in attributes and config values that are set by the user.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message