Mercurial > prosody-hg
comparison util/dependencies.lua @ 6043:29d2dd705148
util.dependencies: Log error when LuaExpat is not capable of enforcing stanza size limits
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sun, 30 Mar 2014 09:15:28 +0100 |
| parents | ee65aa40ef60 |
| children | 7a5ddbaf758d 9ab23488a17c |
comparison
equal
deleted
inserted
replaced
| 6042:1107d66d2ab2 | 6043:29d2dd705148 |
|---|---|
| 138 end | 138 end |
| 139 if lxp then | 139 if lxp then |
| 140 if not pcall(lxp.new, { StartDoctypeDecl = false }) then | 140 if not pcall(lxp.new, { StartDoctypeDecl = false }) then |
| 141 log("error", "The version of LuaExpat on your system leaves Prosody " | 141 log("error", "The version of LuaExpat on your system leaves Prosody " |
| 142 .."vulnerable to denial-of-service attacks. You should upgrade to " | 142 .."vulnerable to denial-of-service attacks. You should upgrade to " |
| 143 .."LuaExpat 1.1.1 or higher as soon as possible. See " | 143 .."LuaExpat 1.3.0 or higher as soon as possible. See " |
| 144 .."http://prosody.im/doc/depends#luaexpat for more information."); | |
| 145 end | |
| 146 if not lxp.new({}).getcurrentbytecount then | |
| 147 log("error", "The version of LuaExpat on your system does not support " | |
| 148 .."stanza size limits, which may leave servers on untrusted " | |
| 149 .."networks (e.g. the internet) vulnerable to denial-of-service " | |
| 150 .."attacks. You should upgrade to LuaExpat 1.3.0 or higher as " | |
| 151 .."soon as possible. See " | |
| 144 .."http://prosody.im/doc/depends#luaexpat for more information."); | 152 .."http://prosody.im/doc/depends#luaexpat for more information."); |
| 145 end | 153 end |
| 146 end | 154 end |
| 147 end | 155 end |
| 148 | 156 |
