]> git.mxchange.org Git - friendica.git/blobdiff - mod/pubsub.php
sanitise all incoming url's - also stop them from getting mangled by simplepie
[friendica.git] / mod / pubsub.php
index c55100c96a3a5b54cc323d645012e72a3e9a0539..df27c6bc2b72d141c3b8e92117a442aeccb1698a 100644 (file)
@@ -39,7 +39,8 @@ function pubsub_init(&$a) {
                $hub_lease     = ((x($_GET,'hub_lease_seconds')) ? notags(trim($_GET['hub_lease_seconds'])) : '');
                $hub_verify    = ((x($_GET,'hub_verify_token'))  ? notags(trim($_GET['hub_verify_token']))  : '');
 
-               logger('pubsub: Subscription from' . $_SERVER['REMOTE_ADDR'] . print_r($_GET,true));
+               logger('pubsub: Subscription from ' . $_SERVER['REMOTE_ADDR']);
+               logger('pubsub: data: ' . print_r($_GET,true), LOGGER_DATA);
 
                $subscribe = (($hub_mode === 'subscribe') ? 1 : 0);
 
@@ -104,8 +105,10 @@ function pubsub_post(&$a) {
                intval($contact_id),
                intval($importer['uid'])
        );
-       if(! count($r))
+       if(! count($r)) {
+               logger('pubsub: no contact record - ignored');
                hub_post_return();
+       }
 
        $contact = $r[0];