Diff

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
parent 4236:75ef9ea83b07
child 5776:bd0ff8ae98a8
child 6043:29d2dd705148
line wrap: on
line diff
--- a/util/dependencies.lua	Tue Nov 22 01:44:28 2011 +0500
+++ b/util/dependencies.lua	Tue Nov 22 02:13:42 2011 +0500
@@ -136,6 +136,14 @@
 			log("error", "This version of LuaSec contains a known bug that causes disconnects, see http://prosody.im/doc/depends");
 		end
 	end
+	if lxp then
+		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 "
+				.."http://prosody.im/doc/depends#luaexpat for more information.");
+		end
+	end
 end
 
 return _M;