Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Reintroduce libxml_disable_entity_loader() calls
  • Loading branch information
solracsf authored Oct 6, 2021
commit 8ee3b84e0a65667e9e2d1c1f16ff5a11f2efe1f7
10 changes: 3 additions & 7 deletions lib/private/App/InfoParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,9 @@ public function parse($file) {
}

libxml_use_internal_errors(true);
if ((PHP_VERSION_ID < 80000)) {
$loadEntities = libxml_disable_entity_loader(false);
$xml = simplexml_load_file($file);
libxml_disable_entity_loader($loadEntities);
} else {
$xml = simplexml_load_file($file);
}
$loadEntities = @libxml_disable_entity_loader(false);
$xml = simplexml_load_file($file);
@libxml_disable_entity_loader($loadEntities);

if ($xml === false) {
libxml_clear_errors();
Expand Down