diff options
author | Kim Alvefur <zash@zash.se> | 2018-03-25 23:30:14 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-03-25 23:30:14 +0200 |
commit | 479ea4dd26f5efd207249f417c27f4e4bda91316 (patch) | |
tree | d812f1b68f0df8b8a4a0835d95423027d42b4288 /plugins/mod_pep_plus.lua | |
parent | f13a157f2ebbc7691f1d717eb8d3ebf680549413 (diff) | |
download | prosody-479ea4dd26f5efd207249f417c27f4e4bda91316.tar.gz prosody-479ea4dd26f5efd207249f417c27f4e4bda91316.zip |
mod_pep_plus: Validate items here too (thanks Link Mauve)
Diffstat (limited to 'plugins/mod_pep_plus.lua')
-rw-r--r-- | plugins/mod_pep_plus.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/mod_pep_plus.lua b/plugins/mod_pep_plus.lua index 3fbb2a95..d1c62357 100644 --- a/plugins/mod_pep_plus.lua +++ b/plugins/mod_pep_plus.lua @@ -34,6 +34,10 @@ function module.restore(data) services = data.services; end +function is_item_stanza(item) + return st.is_stanza(item) and item.attr.xmlns == xmlns_pubsub and item.name == "item"; +end + local function subscription_presence(username, recipient) local user_bare = jid_join(username, host); local recipient_bare = jid_bare(recipient); @@ -188,6 +192,7 @@ function get_pep_service(username) itemstore = simple_itemstore(username); broadcaster = get_broadcaster(username); + itemcheck = is_item_stanza; get_affiliation = function (jid) if jid_bare(jid) == user_bare then return "owner"; |