Skip to content
This repository has been archived by the owner on Jan 2, 2019. It is now read-only.

Commit

Permalink
Disabled libxml external entity loading by default.
Browse files Browse the repository at this point in the history
If you want to allow loading external entity references in XML, call PHPExcel_Settings::setLibXmlLoaderOptions(0).
  • Loading branch information
maartenba committed Feb 21, 2014
1 parent 220da74 commit 1dad681
Show file tree
Hide file tree
Showing 5 changed files with 285 additions and 254 deletions.
6 changes: 3 additions & 3 deletions Classes/PHPExcel/Reader/Excel2003XML.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function listWorksheetNames($pFilename)

$worksheetNames = array();

$xml = simplexml_load_file($pFilename);
$xml = simplexml_load_file($pFilename, 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions());
$namespaces = $xml->getNamespaces(true);

$xml_ss = $xml->children($namespaces['ss']);
Expand Down Expand Up @@ -165,7 +165,7 @@ public function listWorksheetInfo($pFilename)

$worksheetInfo = array();

$xml = simplexml_load_file($pFilename);
$xml = simplexml_load_file($pFilename, 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions());
$namespaces = $xml->getNamespaces(true);

$worksheetID = 1;
Expand Down Expand Up @@ -330,7 +330,7 @@ public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel)
throw new PHPExcel_Reader_Exception($pFilename . " is an Invalid Spreadsheet file.");
}

$xml = simplexml_load_file($pFilename);
$xml = simplexml_load_file($pFilename, 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions());
$namespaces = $xml->getNamespaces(true);

$docProps = $objPHPExcel->getProperties();
Expand Down
Loading

0 comments on commit 1dad681

Please # to comment.