Philipp Holzer 2019-10-24 21:43:20 +02:00
parent 2fba7ed477
commit a83dfc11a0
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90

View file

@ -5,6 +5,7 @@ namespace Friendica\Module\Diaspora;
use Friendica\App; use Friendica\App;
use Friendica\BaseModule; use Friendica\BaseModule;
use Friendica\Core\Config\Configuration; use Friendica\Core\Config\Configuration;
use Friendica\Core\L10n\L10n;
use Friendica\Model\User; use Friendica\Model\User;
use Friendica\Network\HTTPException; use Friendica\Network\HTTPException;
use Friendica\Protocol\Diaspora; use Friendica\Protocol\Diaspora;
@ -34,7 +35,8 @@ class Receive extends BaseModule
$enabled = $config->get('system', 'diaspora_enabled', false); $enabled = $config->get('system', 'diaspora_enabled', false);
if (!$enabled) { if (!$enabled) {
self::$logger->info('Diaspora disabled.'); self::$logger->info('Diaspora disabled.');
throw new HTTPException\InternalServerErrorException('Diaspora disabled.'); $l10n = self::getClass(L10n::class);
throw new HTTPException\ForbiddenException($l10n->t('Access denied.'));
} }
/** @var App\Arguments $args */ /** @var App\Arguments $args */