mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-09 10:32:50 +01:00
Fix libxml_disable_entity_loader(true) must be called only if LIBXML is
lower than 20900 (disabled by default for libxml 2.9.0)
This commit is contained in:
@@ -2052,6 +2052,12 @@ class Setup extends DolibarrApi
|
||||
throw new RestException(500, $langs->trans("ErrorURLMustEndWith", $xmlremote, '.xml'));
|
||||
}
|
||||
|
||||
if (LIBXML_VERSION < 20900) {
|
||||
// Avoid load of external entities (security problem).
|
||||
// Required only if LIBXML_VERSION < 20900
|
||||
libxml_disable_entity_loader(true);
|
||||
}
|
||||
|
||||
if ($target == 'local') {
|
||||
if (dol_is_file($xmlfile)) {
|
||||
$xml = simplexml_load_file($xmlfile);
|
||||
|
||||
Reference in New Issue
Block a user