util.dependencies: Log error when LuaExpat is not capable of enforcing stanza size...
authorMatthew Wild <mwild1@gmail.com>
Sun, 30 Mar 2014 08:15:28 +0000 (09:15 +0100)
committerMatthew Wild <mwild1@gmail.com>
Sun, 30 Mar 2014 08:15:28 +0000 (09:15 +0100)
util/dependencies.lua

index 53d2719d515829a454ec5bf4f96417ba95f232fd..e55b240596a2b563b8216091f20f305e81fe3fd0 100644 (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