Skip to content

Commit

Permalink
mod_s2s: fixes #531
Browse files Browse the repository at this point in the history
Safe out stream parsing in error callbacks
  • Loading branch information
maranda committed Jun 18, 2021
1 parent 071c68c commit 2b48247
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/mod_s2s/mod_s2s.lua
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ function stream_callbacks.error(session, error, data)
elseif error == "stream-error" then
local condition, text = "undefined-condition";
for child in data:children() do
if child.attr.xmlns == xmlns_xmpp_streams then
if type(child.attr) == "table" and child.attr.xmlns == xmlns_xmpp_streams then
if child.name ~= "text" then
condition = child.name;
else
Expand Down

0 comments on commit 2b48247

Please # to comment.