diff options
author | Friendika <info@friendika.com> | 2011-03-04 20:55:32 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-03-04 20:55:32 -0800 |
commit | 216f038456cae1016e030b33cac79f8ed690e366 (patch) | |
tree | 3db6bdcb57a3e68f24f7366da5d966a60bbb51a1 /mod/pubsub.php | |
parent | 3c076b53fe0fb3d5e625b773a5e4723dece0a057 (diff) | |
download | volse-hubzilla-216f038456cae1016e030b33cac79f8ed690e366.tar.gz volse-hubzilla-216f038456cae1016e030b33cac79f8ed690e366.tar.bz2 volse-hubzilla-216f038456cae1016e030b33cac79f8ed690e366.zip |
icon changes, feed security improvements
Diffstat (limited to 'mod/pubsub.php')
-rw-r--r-- | mod/pubsub.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mod/pubsub.php b/mod/pubsub.php index df27c6bc2..5d8ea2ed7 100644 --- a/mod/pubsub.php +++ b/mod/pubsub.php @@ -55,7 +55,8 @@ function pubsub_init(&$a) { $sql_extra = ((strlen($hub_verify)) ? sprintf(" AND `hub-verify` = '%s' ", dbesc($hub_verify)) : ''); - $r = q("SELECT * FROM `contact` WHERE `poll` = '%s' AND `id` = %d AND `uid` = %d AND `blocked` = 0 $sql_extra LIMIT 1", + $r = q("SELECT * FROM `contact` WHERE `poll` = '%s' AND `id` = %d AND `uid` = %d + AND `blocked` = 0 AND `pending` = 0 $sql_extra LIMIT 1", dbesc($hub_topic), intval($contact_id), intval($owner['uid']) @@ -101,10 +102,14 @@ function pubsub_post(&$a) { $importer = $r[0]; - $r = q("SELECT * FROM `contact` WHERE `subhub` = 1 AND `id` = %d AND `uid` = %d AND `blocked` = 0 AND `readonly` = 0 LIMIT 1", + $r = q("SELECT * FROM `contact` WHERE `subhub` = 1 AND `id` = %d AND `uid` = %d + AND ( `rel` = %d OR `rel` = %d ) AND `blocked` = 0 AND `readonly` = 0 LIMIT 1", intval($contact_id), - intval($importer['uid']) + intval($importer['uid']), + intval(REL_FAN), + intval(REL_BUD) ); + if(! count($r)) { logger('pubsub: no contact record - ignored'); hub_post_return(); |