Disable XML loading plugins on old PHP
When libxml_disable_entity_loader is not available, we can not guarantee safe handling of XML data.
This commit is contained in:
@@ -13,6 +13,13 @@ if (! defined('PHPMYADMIN')) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* We need way to disable external XML entities processing.
|
||||||
|
*/
|
||||||
|
if (!function_exists('libxml_disable_entity_loader')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The possible scopes for $plugin_param are: 'table', 'database', and 'server'
|
* The possible scopes for $plugin_param are: 'table', 'database', and 'server'
|
||||||
*/
|
*/
|
||||||
@@ -66,9 +73,7 @@ unset($data);
|
|||||||
/**
|
/**
|
||||||
* Disable loading of external XML entities.
|
* Disable loading of external XML entities.
|
||||||
*/
|
*/
|
||||||
if (function_exists('libxml_disable_entity_loader')) {
|
libxml_disable_entity_loader();
|
||||||
libxml_disable_entity_loader();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load the XML string
|
* Load the XML string
|
||||||
|
@@ -12,6 +12,13 @@ if (! defined('PHPMYADMIN')) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* We need way to disable external XML entities processing.
|
||||||
|
*/
|
||||||
|
if (!function_exists('libxml_disable_entity_loader')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The possible scopes for $plugin_param are: 'table', 'database', and 'server'
|
* The possible scopes for $plugin_param are: 'table', 'database', and 'server'
|
||||||
*/
|
*/
|
||||||
@@ -59,9 +66,7 @@ unset($data);
|
|||||||
/**
|
/**
|
||||||
* Disable loading of external XML entities.
|
* Disable loading of external XML entities.
|
||||||
*/
|
*/
|
||||||
if (function_exists('libxml_disable_entity_loader')) {
|
libxml_disable_entity_loader();
|
||||||
libxml_disable_entity_loader();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load the XML string
|
* Load the XML string
|
||||||
|
Reference in New Issue
Block a user