X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=util%2Fdependencies.lua;h=ea19d9a8b606b4f5cfa1d372b54d0f117035135c;hb=e1e1bd2dfa385b1003eb6ccbabda639ecb99114e;hp=109a3332e9180c50dcc0915cd4d3af0d53340584;hpb=9cd5c05ecd73c691966be58796545081b168f958;p=prosody.git diff --git a/util/dependencies.lua b/util/dependencies.lua index 109a3332..ea19d9a8 100644 --- a/util/dependencies.lua +++ b/util/dependencies.lua @@ -49,6 +49,14 @@ package.preload["util.ztact"] = function () end; function check_dependencies() + if _VERSION ~= "Lua 5.1" then + print "***********************************" + print("Unsupported Lua version: ".._VERSION); + print("Only Lua 5.1 is supported."); + print "***********************************" + return false; + end + local fatal; local lxp = softreq "lxp" @@ -140,7 +148,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