瀏覽代碼

This fixes a problem where non-existent domains could cause the lua script to fail which would then leave the database connection open and eventually lead to denial of service when the database runs out of connections. Everyone using xml handler needs this update.

Mark Crane 12 年之前
父節點
當前提交
a8d6112db3
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      includes/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua

+ 5 - 0
includes/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua

@@ -85,6 +85,11 @@
 				continue = false;
 			end
 
+		--prevent processing for invalid domains
+			if (domain_uuid == nil) then
+				continue = false;
+			end
+
 		--get the extension from the database
 			if (continue) then
 				sql = "SELECT * FROM v_extensions WHERE domain_uuid = '" .. domain_uuid .. "' and extension = '" .. user .. "' and enabled = 'true' ";