don't parse garbage in phase2 of dfrn_deliver either
This commit is contained in:
parent
a4cbdc2414
commit
01cd7cc9f2
|
@ -894,6 +894,13 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
|
||||||
if((! $curl_stat) || (! strlen($xml)))
|
if((! $curl_stat) || (! strlen($xml)))
|
||||||
return(-1); // timed out
|
return(-1); // timed out
|
||||||
|
|
||||||
|
|
||||||
|
if(strpos($xml,'<?xml') === false) {
|
||||||
|
logger('dfrn_deliver: phase 2: no valid XML returned');
|
||||||
|
logger('dfrn_deliver: phase 2: returned XML: ' . $xml, LOGGER_DATA);
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
$res = simplexml_load_string($xml);
|
$res = simplexml_load_string($xml);
|
||||||
|
|
||||||
return $res->status;
|
return $res->status;
|
||||||
|
|
Loading…
Reference in a new issue