Merge branch 'master', remote-tracking branch 'remotes/upstream/master'

* remotes/upstream/master:
  also block outbound
  let's catch d* disabled at a higher level and not waste any resources on it.

* master:
This commit is contained in:
Simon L'nu 2012-04-05 00:03:30 -04:00
commit 9c4fca446b
2 changed files with 12 additions and 0 deletions

View file

@ -2283,6 +2283,11 @@ function diaspora_send_mail($item,$owner,$contact) {
function diaspora_transmit($owner,$contact,$slap,$public_batch) {
$enabled = intval(get_config('system','diaspora_enabled'));
if(! $enabled) {
return 200;
}
$a = get_app();
$logid = random_string(4);
$dest_url = (($public_batch) ? $contact['batch'] : $contact['notify']);

View file

@ -12,6 +12,13 @@ require_once('include/diaspora.php');
function receive_post(&$a) {
$enabled = intval(get_config('system','diaspora_enabled'));
if(! $enabled) {
logger('mod-diaspora: disabled');
http_status_exit(500);
}
$public = false;
if(($a->argc == 2) && ($a->argv[1] === 'public')) {