# HG changeset patch # User Kim Alvefur # Date 1572704873 -3600 # Node ID b337df192a10fa364157443f70ffcca443c5af77 # Parent 3d0adbc74c39fb5723d1d4d0f831c40887d78c29 mod_dialback: Abort early if request is missing addressing attributes Prevents traceback from passing nil to nameprep() diff -r 3d0adbc74c39 -r b337df192a10 plugins/mod_dialback.lua --- a/plugins/mod_dialback.lua Sat Nov 02 13:56:13 2019 +0100 +++ b/plugins/mod_dialback.lua Sat Nov 02 15:27:53 2019 +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