Change in vdsm[master]: agent: XML Character filtering improvement
vfeenstr at redhat.com
vfeenstr at redhat.com
Wed Apr 17 10:34:03 UTC 2013
Vinzenz Feenstra has posted comments on this change.
Change subject: agent: XML Character filtering improvement
......................................................................
Patch Set 4: (1 inline comment)
....................................................
File vdsm/guestIF.py
Line 325: if err.errno == errno.EWOULDBLOCK:
Line 326: pass
Line 327:
Line 328: def _parseLine(self, line):
Line 329: line = _filterXmlChars(line)
I quote the commit message here: "The filtering of invalid characters for XML documents must not be
performed on unicode strings but on the encoded utf-8 string."
The data we get is defined to be utf-8 encoded so we filter the data BEFORE it is decoded from utf-8. So we can already filter out stuff which would be invalid UTF-8.
The _filterObject call is a precaution on top of it to filter out even other characters after decoding.
Line 330: args = json.loads(line.decode('utf8'))
Line 331: args = _filterObject(args)
Line 332: name = args['__name__']
Line 333: del args['__name__']
--
To view, visit http://gerrit.ovirt.org/13809
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I21b970c8552b3f238c6bfe9271c5c5a37d40ea4d
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Peter V. Saveliev <peet at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the vdsm-patches
mailing list