aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-12-07 00:01:03 +0100
committerMario Vavti <mario@mariovavti.com>2015-12-07 00:01:03 +0100
commitc8c9916b5977e3ae8db4762209ca4bf99a3058ee (patch)
treeeb8b5c906054a85a6120aff623ae19941f849f88 /include/zot.php
parent5490919557362176ae50005f3f205505c21cbe23 (diff)
parent3f920da4137ecb91b3aeb2683f2e2b59b4d088cc (diff)
downloadvolse-hubzilla-c8c9916b5977e3ae8db4762209ca4bf99a3058ee.tar.gz
volse-hubzilla-c8c9916b5977e3ae8db4762209ca4bf99a3058ee.tar.bz2
volse-hubzilla-c8c9916b5977e3ae8db4762209ca4bf99a3058ee.zip
Merge branch 'master' of https://github.com/redmatrix/hubzilla
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/zot.php b/include/zot.php
index 6764072aa..d41d5e828 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1611,6 +1611,14 @@ function process_delivery($sender, $arr, $deliveries, $relay, $public = false, $
$channel = $r[0];
$DR->addto_recipient($channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . get_app()->get_hostname() . '>');
+ /* blacklisted channels get a permission denied, no special message to tip them off */
+
+ if(! check_channelallowed($sender['hash'])) {
+ $DR->update('permission denied');
+ $result[] = $DR->get();
+ continue;
+ }
+
/**
* @FIXME: Somehow we need to block normal message delivery from our clones, as the delivered
* message doesn't have ACL information in it as the cloned copy does. That copy
@@ -2082,6 +2090,14 @@ function process_mail_delivery($sender, $arr, $deliveries) {
$channel = $r[0];
$DR->addto_recipient($channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . get_app()->get_hostname() . '>');
+ /* blacklisted channels get a permission denied, no special message to tip them off */
+
+ if(! check_channelallowed($sender['hash'])) {
+ $DR->update('permission denied');
+ $result[] = $DR->get();
+ continue;
+ }
+
if(! perm_is_allowed($channel['channel_id'],$sender['hash'],'post_mail')) {
logger("permission denied for mail delivery {$channel['channel_id']}");
$DR->update('permission denied');