Lower debug level for malformed avatar stanzas
This commit is contained in:
parent
84af966a87
commit
7ec57e4dab
|
@ -625,23 +625,23 @@ class PubsubAvatarReceivedEvent(nec.NetworkIncomingEvent):
|
||||||
item = self.items_node.getTag('item')
|
item = self.items_node.getTag('item')
|
||||||
if not item:
|
if not item:
|
||||||
log.warning('Received malformed avatar data via pubsub')
|
log.warning('Received malformed avatar data via pubsub')
|
||||||
log.warning(self.stanza)
|
log.debug(self.stanza)
|
||||||
return
|
return
|
||||||
self.sha = item.getAttr('id')
|
self.sha = item.getAttr('id')
|
||||||
data_tag = item.getTag('data', namespace='urn:xmpp:avatar:data')
|
data_tag = item.getTag('data', namespace='urn:xmpp:avatar:data')
|
||||||
if self.sha is None or data_tag is None:
|
if self.sha is None or data_tag is None:
|
||||||
log.warning('Received malformed avatar data via pubsub')
|
log.warning('Received malformed avatar data via pubsub')
|
||||||
log.warning(self.stanza)
|
log.debug(self.stanza)
|
||||||
return
|
return
|
||||||
self.data = data_tag.getData()
|
self.data = data_tag.getData()
|
||||||
if self.data is None:
|
if self.data is None:
|
||||||
log.warning('Received malformed avatar data via pubsub')
|
log.warning('Received malformed avatar data via pubsub')
|
||||||
log.warning(self.stanza)
|
log.debug(self.stanza)
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
self.data = base64.b64decode(self.data.encode('utf-8'))
|
self.data = base64.b64decode(self.data.encode('utf-8'))
|
||||||
except binascii.Error as err:
|
except binascii.Error as err:
|
||||||
log.warning('Received malformed avatar data via pubsub: %s' % err)
|
log.debug('Received malformed avatar data via pubsub: %s' % err)
|
||||||
return
|
return
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in New Issue