aboutsummaryrefslogtreecommitdiffstats
path: root/util/dependencies.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2014-03-30 09:15:28 +0100
committerMatthew Wild <mwild1@gmail.com>2014-03-30 09:15:28 +0100
commitbe4a3099fbc0063d16899eefe9aa491e876464cf (patch)
treefedfb127792bf13ccdf77108bdadbdd4428559ad /util/dependencies.lua
parent5c8899860ebe48232361e32f5fbc7ca0469935aa (diff)
downloadprosody-be4a3099fbc0063d16899eefe9aa491e876464cf.tar.gz
prosody-be4a3099fbc0063d16899eefe9aa491e876464cf.zip
util.dependencies: Log error when LuaExpat is not capable of enforcing stanza size limits
Diffstat (limited to 'util/dependencies.lua')
-rw-r--r--util/dependencies.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/util/dependencies.lua b/util/dependencies.lua
index 53d2719d..e55b2405 100644
--- a/util/dependencies.lua
+++ b/util/dependencies.lua
@@ -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