Menu

#2168 wbemcli throws parser error on CDATA string value

pending-fixed
5
2011-06-22
2011-03-16
No

wbemcli throws a parser error on CDATA value on a property of string type. This only occurs if the fix for bug ID 3202420 is applied.

Example data and error display:
<PROPERTY NAME="PrimaryOwnerContact" TYPE="string">
<VALUE><![CDATA[root@galant2; <sample, cdata & value>]]></VALUE>
</PROPERTY>
*
* ./wbemcli: Parse Exception: Expecting /VALUE element
*

Proposed fix attached.

Discussion

  • Tyrel Datwyler

    Tyrel Datwyler - 2011-06-22

    Committed to CVS Head.

     
  • Tyrel Datwyler

    Tyrel Datwyler - 2011-06-22
    • status: open --> pending-fixed
     
  • Klaus Kämpf

    Klaus Kämpf - 2012-02-24

    This fix seems incomplete in combination with ID 3202420 if the string property contains XML with embedded CDATA, i.e. (expanding the above example)

    <PROPERTY NAME="PrimaryOwnerContact" TYPE="string">
    <VALUE>&lt;email&gt;<![CDATA[root@galant2; <sample, cdata & value>]]>&lt;/email&gt;</VALUE>
    </PROPERTY>

     
  • Klaus Kämpf

    Klaus Kämpf - 2012-02-24

    The strncmp() call looking for "<![CDATA[" only looks for 8 characters while the string is 9 characters long !

     

Log in to post a comment.