Software /
code /
prosody
Changeset
10376:b337df192a10
mod_dialback: Abort early if request is missing addressing attributes
Prevents traceback from passing nil to nameprep()
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 02 Nov 2019 15:27:53 +0100 |
parents | 10375:3d0adbc74c39 |
children | 10377:4c36bc28b99e |
files | plugins/mod_dialback.lua |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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