mirror of
https://github.com/friendica/friendica
synced 2024-12-22 22:40:16 +00:00
don't parse garbage in phase2 of dfrn_deliver either
This commit is contained in:
parent
a4cbdc2414
commit
01cd7cc9f2
1 changed files with 7 additions and 0 deletions
|
@ -894,6 +894,13 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) {
|
|||
if((! $curl_stat) || (! strlen($xml)))
|
||||
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);
|
||||
|
||||
return $res->status;
|
||||
|
|
Loading…
Reference in a new issue