# HG changeset patch # User Matthew Wild # Date 1396167328 -3600 # Node ID 29d2dd705148fde5f5524d97113d0e27e0694189 # Parent 1107d66d2ab2cbf40b7e3c1b071d4e465b374a82 util.dependencies: Log error when LuaExpat is not capable of enforcing stanza size limits diff -r 1107d66d2ab2 -r 29d2dd705148 util/dependencies.lua --- 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