We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d813bd6 + ff7b9ff commit 5e20d6dCopy full SHA for 5e20d6d
PSWebServiceLibrary.php
@@ -274,7 +274,13 @@ protected function parseXML($response)
274
if ($response != '') {
275
libxml_clear_errors();
276
libxml_use_internal_errors(true);
277
- $xml = simplexml_load_string(trim($response), 'SimpleXMLElement', LIBXML_NOCDATA);
+ if (LIBXML_VERSION < 20900) {
278
+ // Avoid load of external entities (security problem).
279
+ // Required only if LIBXML_VERSION < 20900
280
+ libxml_disable_entity_loader(true);
281
+ }
282
+
283
+ $xml = simplexml_load_string(trim($response), 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
284
if (libxml_get_errors()) {
285
$msg = var_export(libxml_get_errors(), true);
286
0 commit comments