Commit 54d0e5b3 authored by Philipp Hörist's avatar Philipp Hörist

Dont fail on malformed avatar data

parent 7eb56761
......@@ -94,6 +94,9 @@ class UserAvatar:
pubsub_node = stanza.getTag('pubsub')
items_node = pubsub_node.getTag('items')
item = items_node.getTag('item')
if item is None:
return raise_error(log.warning, stanza, 'stanza-malformed',
'No item in node found')
sha = item.getAttr('id')
data_node = item.getTag('data', namespace=NS_AVATAR_DATA)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment