[fusion-commits] r2867 - sandbox/adsk/2.5k/common/php

svn_fusion at osgeo.org svn_fusion at osgeo.org
Mon Jul 28 00:15:12 PDT 2014


Author: ChristineBao
Date: 2014-07-28 00:15:11 -0700 (Mon, 28 Jul 2014)
New Revision: 2867

Modified:
   sandbox/adsk/2.5k/common/php/Xml2JSON.php
Log:
#617: XXE security fix

Modified: sandbox/adsk/2.5k/common/php/Xml2JSON.php
===================================================================
--- sandbox/adsk/2.5k/common/php/Xml2JSON.php	2014-07-10 03:36:08 UTC (rev 2866)
+++ sandbox/adsk/2.5k/common/php/Xml2JSON.php	2014-07-28 07:15:11 UTC (rev 2867)
@@ -28,6 +28,10 @@
  */
 include(dirname(__FILE__).'/Utilities.php');
 
+//Requests to this script can be made from anywhere, so disable XML entity loading to
+//guard against malicious XML
+libxml_disable_entity_loader(true);
+
 if (isset($_FILES['xml'])) {
     $xml = file_get_contents($_FILES['xml']['tmp_name']);
 } elseif (isset($_SERVER['HTTP_HOST'])) {



More information about the fusion-commits mailing list