21 {
22 if (!is_string(
$xml) || trim(
$xml) ===
'') {
24 }
25
26 $entityLoader = libxml_disable_entity_loader(true);
27 $internalErrors = libxml_use_internal_errors(true);
28 libxml_clear_errors();
29
31 $options = LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_NONET;
34 }
35
37
38 libxml_use_internal_errors($internalErrors);
39 libxml_disable_entity_loader($entityLoader);
40
41 if (!$loaded) {
42 $error = libxml_get_last_error();
43 libxml_clear_errors();
44
45 throw new UnparseableXmlException(
$error);
46 }
47
48 libxml_clear_errors();
49
50 foreach ($domDocument->childNodes as $child) {
51 if ($child->nodeType === XML_DOCUMENT_TYPE_NODE) {
52 throw new RuntimeException(
53 'Dangerous XML detected, DOCTYPE nodes are not allowed in the XML body'
54 );
55 }
56 }
57
58 return $domDocument;
59 }
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'