--- a/plugins/mod_component.lua Wed Dec 16 10:55:04 2020 +0100
+++ b/plugins/mod_component.lua Fri Dec 18 22:29:44 2020 +0100
@@ -193,6 +193,10 @@
end
function stream_callbacks.streamopened(session, attr)
+ if not attr.to then
+ session:close{ condition = "improper-addressing", text = "A 'to' attribute is required on stream headers" };
+ return;
+ end
if not hosts[attr.to] or not hosts[attr.to].modules.component then
session:close{ condition = "host-unknown", text = tostring(attr.to).." does not match any configured external components" };
return;