Replace System::httpExit() by HTTPException throwing
This commit is contained in:
@@ -5,7 +5,6 @@ namespace Friendica\Module;
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Network\Probe;
|
||||
|
||||
/**
|
||||
@@ -13,22 +12,14 @@ use Friendica\Network\Probe;
|
||||
*/
|
||||
class WebFinger extends BaseModule
|
||||
{
|
||||
public static function init()
|
||||
{
|
||||
if (!local_user()) {
|
||||
System::httpExit(
|
||||
403,
|
||||
[
|
||||
'title' => L10n::t('Public access denied.'),
|
||||
'description' => L10n::t('Only logged in users are permitted to perform a probing.'),
|
||||
],
|
||||
);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
public static function content()
|
||||
{
|
||||
if (!local_user()) {
|
||||
$e = new \Friendica\Network\HTTPException\ForbiddenException(L10n::t("Only logged in users are permitted to perform a probing."));
|
||||
$e->httpdesc = L10n::t("Public access denied.");
|
||||
throw $e;
|
||||
}
|
||||
|
||||
$app = self::getApp();
|
||||
|
||||
$addr = defaults($_GET, 'addr', '');
|
||||
|
||||
Reference in New Issue
Block a user