# HG changeset patch # User Kim Alvefur # Date 1543148045 -3600 # Node ID e31053344231f86cad5c98da4a628f0c5dc8a4a4 # Parent cbd3b9d4c60b5c7614c07b3fe4a2ba9950b15a74 mod_proxy65: Return an error if no port is open (fixes #1240) diff -r cbd3b9d4c60b -r e31053344231 plugins/mod_proxy65.lua --- a/plugins/mod_proxy65.lua Wed Oct 24 17:13:49 2018 +0200 +++ b/plugins/mod_proxy65.lua Sun Nov 25 13:14:05 2018 +0100 @@ -121,6 +121,12 @@ return true; end + if not proxy_port then + module:log("warn", "Not listening on any port"); + origin.send(st.error_reply(stanza, "wait", "item-not-found", "Not listening on any port")); + return true; + end + local sid = stanza.tags[1].attr.sid; origin.send(st.reply(stanza):tag("query", {xmlns="http://jabber.org/protocol/bytestreams", sid=sid}) :tag("streamhost", {jid=host, host=proxy_address, port=proxy_port}));