From: Chris B. <buc...@us...> - 2011-03-09 21:44:34
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "SFCB - Small Footprint CIM Broker". The branch, master has been updated via 80e6bc17830f7e2fcc66c58beb062ce0ebdad719 (commit) from b61b5c4cf71b8c15b6432f3ae2d9355067bffd10 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 80e6bc17830f7e2fcc66c58beb062ce0ebdad719 Author: buccella <buc...@li...> Date: Wed Mar 9 16:44:16 2011 -0500 [ 3202420 ] CDATA value in a string property is improperly XML escaped ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 10fb807..3f66017 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-03-09 Chris Buccella <buc...@li...> + + * cimXmlGen.c: + [ 3202420 ] CDATA value in a string property is improperly XML escaped + (patch by Chris Poblete) + 2011-03-08 Chris Buccella <buc...@li...> * httpAdapter.c, sfcBasicPAMAuthentication.c: diff --git a/NEWS b/NEWS index c980efa..36779d2 100644 --- a/NEWS +++ b/NEWS @@ -65,6 +65,7 @@ Bugs fixed: - 3185178 Wrong classname for returned instances from execQuery - 3175770 execQuery returns multiple instances of same object - 3203290 Basic Auth Should Consider Expired Passwords +- 3202420 CDATA value in a string property is improperly XML escaped Changes in 1.3.10 ================= diff --git a/cimXmlGen.c b/cimXmlGen.c index c3cf118..16deb25 100644 --- a/cimXmlGen.c +++ b/cimXmlGen.c @@ -66,7 +66,7 @@ XMLEscape(char *in, int *outlen) l, o, n; - char *out; + char *out, *end; char *rep; _SFCB_ENTER(TRACE_CIMXMLPROC, "XMLEscape"); @@ -85,6 +85,19 @@ XMLEscape(char *in, int *outlen) rep = ">"; break; case '<': + + /* skip escaping if this is a CDATA section */ + if ((in[i+1] == '!') && ((l-i) > 11)) { /* do minimum check, then check if enough chars to compare */ + rep = &in[i]; + if (!strncmp(rep, "<![CDATA[", 9)) { /* now look for the cdata start marker */ + if ((end = strstr(rep, "]]>"))) { /* valid cdata should have end marker */ + n = ((end-rep)+3); + i += (n - 1); + break; + } /* else, bad format */ + } + } + n = 4; rep = "<"; break; diff --git a/contributions.txt b/contributions.txt index 595e8c6..7ac411a 100644 --- a/contributions.txt +++ b/contributions.txt @@ -181,6 +181,7 @@ Chris Poblete, Dell 11/08/2010 [ 3101155 ] Failed to load provider libraries due to symbol conflicts 11/09/2010 [ 3101148 ] SfcbLocal method parameter type conversion and validation 11/10/2010 [ 3101154 ] Daemon clients failed SfcbLocal connect due to permission +03/09/2010 [ 3202420 ] CDATA value in a string property is improperly XML escaped Josef Moellers -------------- hooks/post-receive -- SFCB - Small Footprint CIM Broker |