aboutsummaryrefslogtreecommitdiffstats
path: root/util/xmppstream.lua
diff options
context:
space:
mode:
Diffstat (limited to 'util/xmppstream.lua')
-rw-r--r--util/xmppstream.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/util/xmppstream.lua b/util/xmppstream.lua
index cf485dac..70420424 100644
--- a/util/xmppstream.lua
+++ b/util/xmppstream.lua
@@ -167,9 +167,12 @@ function new_sax_handlers(session, stream_callbacks)
stack = {};
end
end
-
- local function restricted_handler()
+
+ local function restricted_handler(parser)
cb_error(session, "parse-error", "restricted-xml", "Restricted XML, see RFC 6120 section 11.1.");
+ if not parser:stop() then
+ error("Failed to abort parsing");
+ end
end
if lxp_supports_doctype then