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

Commit

Permalink
Disable external loading on DOM and Soap components use of DOMDocument
Browse files Browse the repository at this point in the history
  • Loading branch information
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ public function queryXpath($xpathQuery, $query = null)

$encoding = $this->getEncoding();
libxml_use_internal_errors(true);
libxml_disable_entity_loader(true);
if (null === $encoding) {
$domDoc = new DOMDocument('1.0');
} else {
Expand All @@ -255,6 +256,7 @@ public function queryXpath($xpathQuery, $query = null)
$this->documentErrors = $errors;
libxml_clear_errors();
}
libxml_disable_entity_loader(false);
libxml_use_internal_errors(false);

if (!$success) {
Expand Down

0 comments on commit 1b246ad

Please sign in to comment.