util.dependencies: Log error when LuaExpat is not capable of enforcing stanza size limits

This commit is contained in:
Matthew Wild 2014-03-30 09:15:28 +01:00
parent 16a37370eb
commit 36a19e92a7

View file

@ -140,7 +140,15 @@ function log_warnings()
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