From 046003acb4089228ed2268c97a947731d482fed8 Mon Sep 17 00:00:00 2001 From: Christian Catalan Date: Tue, 19 May 2015 12:47:19 -0500 Subject: [PATCH] Increase REXML expansion text limit MSP-9532 * Increase to reasonable size to handle larger xml file expansion on import * Prevents the 'RuntimeError entity expansion has grown too large' error that prevents import --- lib/msf/core/db_manager/import.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/msf/core/db_manager/import.rb b/lib/msf/core/db_manager/import.rb index 0450cafe71..c93fb6cb5b 100644 --- a/lib/msf/core/db_manager/import.rb +++ b/lib/msf/core/db_manager/import.rb @@ -129,6 +129,8 @@ module Msf::DBManager::Import end end + # Override REXML's expansion text limit to 50k (default: 10240 bytes) + REXML::Security.entity_expansion_text_limit = 51200 if block import(args.merge(:data => data)) { |type,data| yield type,data }