[
https://issues.apache.org/jira/browse/CONNECTORS-1603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Raman Gupta updated CONNECTORS-1603:
------------------------------------
Description:
When using Zookeeper to store the global config, it is impossible to have
entities in the input XML. For example if we have a db password with value
"foo&bar", then we have to encode this in the global config XML like this:
<property name="org.apache.manifoldcf.dbsuperuserpassword" value="foo&bar"/>
When writing the global config to Zookeeper, it appears like this XML file is
parsed, but then written to ZooKeeper as:
<property name="org.apache.manifoldcf.dbsuperuserpassword" value="foo&bar"/>
Now, when this global config is read from ZooKeeper, Manifold parses it as XML
again, and of course fails with the error:
Caused by: org.xml.sax.SAXParseException; lineNumber: 31; columnNumber: 81; The
reference to entity "bar" must end with the ';' delimiter.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at java.xml/javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
at org.apache.manifoldcf.core.common.XMLDoc.init(XMLDoc.java:359)
... 9 more
was:
When using Zookeeper to store the global config, it is impossible to have
entities in the input XML. For example if we have a db password with value
"foo&bar", then we have to encode this in the global config XML like this:
<property name="org.apache.manifoldcf.dbsuperuserpassword" value="foo&bar"/>
When writing the global config to Zookeeper, it appears like this XML file is
parsed, but then written to ZooKeeper as:
<property name="org.apache.manifoldcf.dbsuperuserpassword" value="foo&bar"/>
Now, when this global config is read from ZooKeeper, Manifold parses it as XML
again, and of course fails with the error:
{{
Caused by: org.xml.sax.SAXParseException; lineNumber: 31; columnNumber: 81; The
reference to entity "bar" must end with the ';' delimiter.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at java.xml/javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
at org.apache.manifoldcf.core.common.XMLDoc.init(XMLDoc.java:359)
... 9 more
}}
> Global config XML double-decoded when stored in Zookeeper
> ---------------------------------------------------------
>
> Key: CONNECTORS-1603
> URL: https://issues.apache.org/jira/browse/CONNECTORS-1603
> Project: ManifoldCF
> Issue Type: Bug
> Reporter: Raman Gupta
> Priority: Major
>
> When using Zookeeper to store the global config, it is impossible to have
> entities in the input XML. For example if we have a db password with value
> "foo&bar", then we have to encode this in the global config XML like this:
> <property name="org.apache.manifoldcf.dbsuperuserpassword" value="foo&bar"/>
> When writing the global config to Zookeeper, it appears like this XML file is
> parsed, but then written to ZooKeeper as:
> <property name="org.apache.manifoldcf.dbsuperuserpassword" value="foo&bar"/>
> Now, when this global config is read from ZooKeeper, Manifold parses it as
> XML again, and of course fails with the error:
> Caused by: org.xml.sax.SAXParseException; lineNumber: 31; columnNumber: 81;
> The reference to entity "bar" must end with the ';' delimiter.
> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
> at java.xml/javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
> at org.apache.manifoldcf.core.common.XMLDoc.init(XMLDoc.java:359)
> ... 9 more
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)