OStatus: catchable exception instead of fatal when parsing valid XML that isn't a valid XRD doc
This commit is contained in:
parent
14065ca350
commit
24835c1164
|
@ -57,6 +57,9 @@ class XRD
|
|||
throw new Exception("Invalid XML");
|
||||
}
|
||||
$xrd_element = $dom->getElementsByTagName('XRD')->item(0);
|
||||
if (!$xrd_element) {
|
||||
throw new Exception("Invalid XML, missing XRD root");
|
||||
}
|
||||
|
||||
// Check for host-meta host
|
||||
$host = $xrd_element->getElementsByTagName('Host')->item(0);
|
||||
|
|
Loading…
Reference in New Issue
Block a user