Software /
code /
prosody
Diff
util/dependencies.lua @ 6043:29d2dd705148
util.dependencies: Log error when LuaExpat is not capable of enforcing stanza size limits
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 30 Mar 2014 09:15:28 +0100 |
parent | 4426:ee65aa40ef60 |
child | 6054:7a5ddbaf758d |
child | 6065:9ab23488a17c |
line wrap: on
line diff
--- a/util/dependencies.lua Sun Mar 30 09:14:39 2014 +0100 +++ b/util/dependencies.lua Sun Mar 30 09:15:28 2014 +0100 @@ -140,7 +140,15 @@ if not pcall(lxp.new, { StartDoctypeDecl = false }) then log("error", "The version of LuaExpat on your system leaves Prosody " .."vulnerable to denial-of-service attacks. You should upgrade to " - .."LuaExpat 1.1.1 or higher as soon as possible. See " + .."LuaExpat 1.3.0 or higher as soon as possible. See " + .."http://prosody.im/doc/depends#luaexpat for more information."); + end + if not lxp.new({}).getcurrentbytecount then + log("error", "The version of LuaExpat on your system does not support " + .."stanza size limits, which may leave servers on untrusted " + .."networks (e.g. the internet) vulnerable to denial-of-service " + .."attacks. You should upgrade to LuaExpat 1.3.0 or higher as " + .."soon as possible. See " .."http://prosody.im/doc/depends#luaexpat for more information."); end end