From 10d650369f60112741085a1a1bd46048cfc25b6a Mon Sep 17 00:00:00 2001 From: Guillaume Bougard Date: Thu, 27 Sep 2018 14:29:28 +0200 Subject: [PATCH] fix(macos): fix software inventory when proxy is used Don't validate XML against DTD to skip downloading DTD as it would fail if a proxy is enable. Closes #453 --- Changes | 2 ++ lib/FusionInventory/Agent/Tools/MacOS.pm | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Changes b/Changes index 9e46970756..5184a72573 100644 --- a/Changes +++ b/Changes @@ -12,6 +12,8 @@ inventory: * Fix #442: kaspersky not fully recognized in russia * Fix #501: wrong status was reported when windows defender was disabled * Enhanced software inventory under Arch Linux +* Fix #453: under MacOS, skip XML DTD validation for software inventory as + parsing may fail if a proxy is enabled deploy: * Bump Deploy task version to 2.7 diff --git a/lib/FusionInventory/Agent/Tools/MacOS.pm b/lib/FusionInventory/Agent/Tools/MacOS.pm index 72c99fd603..b11a9d83f1 100644 --- a/lib/FusionInventory/Agent/Tools/MacOS.pm +++ b/lib/FusionInventory/Agent/Tools/MacOS.pm @@ -46,6 +46,10 @@ sub _initXmlParser { } elsif ($params{file}) { $xmlParser = XML::XPath->new(filename => $params{file}); } + + # Don't validate XML against DTD, parsing may fail if a proxy is active + $XML::XPath::ParseParamEnt = 0; + return $xmlParser; }