Vinzenz Feenstra has posted comments on this change. Change subject: virt: Only filter guest agent data, only on XMLRPC ......................................................................
Patch Set 6: (3 comments) https://gerrit.ovirt.org/#/c/36949/6/vdsm/virt/guestagent.py File vdsm/virt/guestagent.py: Line 334: Line 335: def getStatus(self): Line 336: return self.guestStatus Line 337: Line 338: def getGuestInfo(self, viaXMLRPC=False): > I'd rename it...propagate "filter" or something like that instead Done Line 339: def filter(o): Line 340: if viaXMLRPC: Line 341: return _filterObject(o) Line 342: return o Line 465: Line 466: return result Line 467: Line 468: @staticmethod Line 469: def _parseLine(line): > no, not really, just noticed it and applied it. I can move it to a separate Done Line 470: # Deal with any bad UTF8 encoding from the (untrusted) guest, Line 471: # by replacing them with the Unicode replacement character Line 472: uniline = line.decode('utf8', 'replace') Line 473: args = json.loads(uniline) Line 474: # Filter out any characters in the untrusted guest response Line 475: # that aren't permitted in XML. This must be done _after_ the Line 476: # JSON decoding, since otherwise JSON's \u escape decoding Line 477: # could be used to generate the bad characters Line 478: args = _filterObject(args) > so this should go away Done Line 479: name = args['__name__'] Line 480: del args['__name__'] -- To view, visit https://gerrit.ovirt.org/36949 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia9ee2a8f1cc6784c619ce68da3cb9342b0d72cfc Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Michal Skrivanek <[email protected]> Gerrit-Reviewer: Vinzenz Feenstra <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
