Software /
code /
prosody
Diff
plugins/mod_dialback.lua @ 11200:bf8f2da84007
Merge 0.11->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 05 Nov 2020 22:31:25 +0100 |
parent | 10380:18685a5e362e |
child | 11526:15a3db955ad3 |
line wrap: on
line diff
--- a/plugins/mod_dialback.lua Thu Nov 05 22:27:17 2020 +0100 +++ b/plugins/mod_dialback.lua Thu Nov 05 22:31:25 2020 +0100 @@ -93,6 +93,11 @@ -- he wants to be identified through dialback -- We need to check the key with the Authoritative server local attr = stanza.attr; + if not attr.to or not attr.from then + origin.log("debug", "Missing Dialback addressing (from=%q, to=%q)", attr.from, attr.to); + origin:close("improper-addressing"); + return true; + end local to, from = nameprep(attr.to), nameprep(attr.from); if not hosts[to] then @@ -102,6 +107,7 @@ return true; elseif not from then origin:close("improper-addressing"); + return true; end if dwd and origin.secure then