[fusion-commits] r2850 - trunk/common/php

svn_fusion at osgeo.org svn_fusion at osgeo.org
Tue Jun 24 20:53:59 PDT 2014


Author: jng
Date: 2014-06-24 20:53:59 -0700 (Tue, 24 Jun 2014)
New Revision: 2850

Modified:
   trunk/common/php/Xml2JSON.php
Log:
#617: XXE security fix

Modified: trunk/common/php/Xml2JSON.php
===================================================================
--- trunk/common/php/Xml2JSON.php	2014-06-20 06:48:03 UTC (rev 2849)
+++ trunk/common/php/Xml2JSON.php	2014-06-25 03:53:59 UTC (rev 2850)
@@ -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