Mercurial > prosody-hg
comparison util/dependencies.lua @ 4426:ee65aa40ef60
util.dependencies, util.xmppstream: Move LuaExpat version checking to util.dependencies.
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Tue, 22 Nov 2011 02:13:42 +0500 |
| parents | 75ef9ea83b07 |
| children | bd0ff8ae98a8 29d2dd705148 |
comparison
equal
deleted
inserted
replaced
| 4425:6f5ed0f4a3e6 | 4426:ee65aa40ef60 |
|---|---|
| 134 local major, minor, veryminor, patched = ssl._VERSION:match("(%d+)%.(%d+)%.?(%d*)(M?)"); | 134 local major, minor, veryminor, patched = ssl._VERSION:match("(%d+)%.(%d+)%.?(%d*)(M?)"); |
| 135 if not major or ((tonumber(major) == 0 and (tonumber(minor) or 0) <= 3 and (tonumber(veryminor) or 0) <= 2) and patched ~= "M") then | 135 if not major or ((tonumber(major) == 0 and (tonumber(minor) or 0) <= 3 and (tonumber(veryminor) or 0) <= 2) and patched ~= "M") then |
| 136 log("error", "This version of LuaSec contains a known bug that causes disconnects, see http://prosody.im/doc/depends"); | 136 log("error", "This version of LuaSec contains a known bug that causes disconnects, see http://prosody.im/doc/depends"); |
| 137 end | 137 end |
| 138 end | 138 end |
| 139 if lxp then | |
| 140 if not pcall(lxp.new, { StartDoctypeDecl = false }) then | |
| 141 log("error", "The version of LuaExpat on your system leaves Prosody " | |
| 142 .."vulnerable to denial-of-service attacks. You should upgrade to " | |
| 143 .."LuaExpat 1.1.1 or higher as soon as possible. See " | |
| 144 .."http://prosody.im/doc/depends#luaexpat for more information."); | |
| 145 end | |
| 146 end | |
| 139 end | 147 end |
| 140 | 148 |
| 141 return _M; | 149 return _M; |
