diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-10-21 14:05:33 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-10-21 14:05:33 +0100 |
commit | 0664ac358ab979b91c8ab7a5973b89fd7b16b129 (patch) | |
tree | c62ee9d10e3e69d3c571c2d04558871657d2070b /core/xmlhandlers.lua | |
parent | ba911faf1a8b521ec358e9d61bb480adf554f673 (diff) | |
download | prosody-0664ac358ab979b91c8ab7a5973b89fd7b16b129.tar.gz prosody-0664ac358ab979b91c8ab7a5973b89fd7b16b129.zip |
xmlhandlers: Reset state on error or stream close, fixes possible traceback
Diffstat (limited to 'core/xmlhandlers.lua')
-rw-r--r-- | core/xmlhandlers.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/xmlhandlers.lua b/core/xmlhandlers.lua index 7f47cf70..9ded74c3 100644 --- a/core/xmlhandlers.lua +++ b/core/xmlhandlers.lua @@ -114,12 +114,13 @@ function init_xmlhandlers(session, stream_callbacks) if cb_streamclosed then cb_streamclosed(session); end - return; elseif name == "error" then cb_error(session, "stream-error", stanza); else cb_error(session, "parse-error", "unexpected-element-close", name); end + stanza, chardata = nil, {}; + return; end if #chardata > 0 then -- We have some character data in the buffer |