We now use a central function for fetching the postdata

This commit is contained in:
Michael 2019-07-30 22:26:01 +00:00
commit b4c673a620
7 changed files with 21 additions and 6 deletions

View file

@ -7,6 +7,7 @@ use Friendica\Database\DBA;
use Friendica\Model\Contact;
use Friendica\Protocol\OStatus;
use Friendica\Util\Strings;
use Friendica\Util\Network;
use Friendica\Core\System;
function hub_return($valid, $body)
@ -83,7 +84,7 @@ function pubsub_init(App $a)
function pubsub_post(App $a)
{
$xml = file_get_contents('php://input');
$xml = Network::postdata();
Logger::log('Feed arrived from ' . $_SERVER['REMOTE_ADDR'] . ' for ' . $a->cmd . ' with user-agent: ' . $_SERVER['HTTP_USER_AGENT']);
Logger::log('Data: ' . $xml, Logger::DATA);