diff options
author | Jonas Schäfer <jonas@wielicki.name> | 2022-01-15 15:39:13 +0100 |
---|---|---|
committer | Jonas Schäfer <jonas@wielicki.name> | 2022-01-15 15:39:13 +0100 |
commit | bb100ed33ec5dfe46eccc3ac0a89e6d7f9952ac3 (patch) | |
tree | 84c84cb1d092e6608ed2f2d53b117807f1b7dae9 | |
parent | b1874898028aa584bb02c3ec082ab8c9f54ae951 (diff) | |
download | prosody-bb100ed33ec5dfe46eccc3ac0a89e6d7f9952ac3.tar.gz prosody-bb100ed33ec5dfe46eccc3ac0a89e6d7f9952ac3.zip |
mod_storage_xep0227: be defensive against empty vCard
An empty vCard store may look like the empty table, which does not have
the `attr` key, which would then blow up in util.stanza.deserialize.
-rw-r--r-- | plugins/mod_storage_xep0227.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_storage_xep0227.lua b/plugins/mod_storage_xep0227.lua index 1676341b..3cd783bc 100644 --- a/plugins/mod_storage_xep0227.lua +++ b/plugins/mod_storage_xep0227.lua @@ -160,7 +160,7 @@ handlers.vcard = { local usere = xml and getUserElement(xml); if usere then usere:remove_children("vCard", "vcard-temp"); - if not data then + if not data or not data.attr then -- No data to set, old one deleted, success return true; end |