Change in vdsm[master]: agent: XML Character filtering improvement

vfeenstr at redhat.com vfeenstr at redhat.com
Wed Apr 17 08:44:11 UTC 2013


Vinzenz Feenstra has posted comments on this change.

Change subject: agent: XML Character filtering improvement
......................................................................


Patch Set 2: (2 inline comments)

....................................................
File vdsm/guestIF.py
Line 44:     def maskRestricted(c):
Line 45:         if ord(c) in __RESTRICTED_CHARS:
Line 46:             return '?'
Line 47:         else:
Line 48:             return c
yes
Line 49:     return ''.join(maskRestricted(c) for c in u)
Line 50: 
Line 51: 
Line 52: class MessageState:


Line 128:             # ovirt-guest-agent reports the following fields in 'memory-stat':
Line 129:             # 'mem_total', 'mem_free', 'mem_unused', 'swap_in', 'swap_out',
Line 130:             # 'pageflt' and 'majflt'
Line 131:             if 'memory-stat' in args:
Line 132:                 for (k, v) in args['memory-stat'].iteritems():
Theoretically no. Practically I would filter the whole object, anyway in Unicode form as well to be on the safe side.
Line 133:                     k = _filterXmlChars(k)
Line 134:                     # Convert the value to string since 64-bit integer is not
Line 135:                     # supported in XMLRPC
Line 136:                     v = _filterXmlChars(str(v))


--
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: 2
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