Software /
code /
prosody
Comparison
util/xmppstream.lua @ 4426:ee65aa40ef60
util.dependencies, util.xmppstream: Move LuaExpat version checking to util.dependencies.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Tue, 22 Nov 2011 02:13:42 +0500 |
parent | 4425:6f5ed0f4a3e6 |
child | 4482:722cf2680028 |
comparison
equal
deleted
inserted
replaced
4425:6f5ed0f4a3e6 | 4426:ee65aa40ef60 |
---|---|
18 local t_remove = table.remove; | 18 local t_remove = table.remove; |
19 local setmetatable = setmetatable; | 19 local setmetatable = setmetatable; |
20 | 20 |
21 -- COMPAT: w/LuaExpat 1.1.0 | 21 -- COMPAT: w/LuaExpat 1.1.0 |
22 local lxp_supports_doctype = pcall(lxp.new, { StartDoctypeDecl = false }); | 22 local lxp_supports_doctype = pcall(lxp.new, { StartDoctypeDecl = false }); |
23 if not lxp_supports_doctype then | |
24 local default_log = require "util.logger".init("xmppstream"); | |
25 default_log("warn", "The version of LuaExpat on your system leaves Prosody " | |
26 .."vulnerable to denial-of-service attacks. You should upgrade to " | |
27 .."LuaExpat 1.1.1 or higher as soon as possible. See " | |
28 .."http://prosody.im/doc/depends#luaexpat for more information."); | |
29 end | |
30 | 23 |
31 module "xmppstream" | 24 module "xmppstream" |
32 | 25 |
33 local new_parser = lxp.new; | 26 local new_parser = lxp.new; |
34 | 27 |