X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=bin%2Fauth_ejabberd.php;h=d6e20dfe15bd435cb47046b7fc3a12ca69592959;hb=2f84d874a874148ad73044a33b88783e09ae424f;hp=f00615f02be452a4b0e3ae458d903e4c6e13fe71;hpb=d9c817df1a7bf78d00d9184eb903de9093050d32;p=friendica.git diff --git a/bin/auth_ejabberd.php b/bin/auth_ejabberd.php index f00615f02b..d6e20dfe15 100755 --- a/bin/auth_ejabberd.php +++ b/bin/auth_ejabberd.php @@ -51,9 +51,14 @@ * */ +if (php_sapi_name() !== 'cli') { + header($_SERVER["SERVER_PROTOCOL"] . ' 403 Forbidden'); + exit(); +} + use Dice\Dice; use Friendica\App\Mode; -use Friendica\Util\ExAuth; +use Friendica\Security\ExAuth; use Psr\Log\LoggerInterface; if (sizeof($_SERVER["argv"]) == 0) { @@ -80,6 +85,7 @@ $dice = $dice->addRule(LoggerInterface::class,['constructParams' => ['auth_ejabb $appMode = $dice->create(Mode::class); if ($appMode->isNormal()) { - $oAuth = new ExAuth(); + /** @var ExAuth $oAuth */ + $oAuth = $dice->create(ExAuth::class); $oAuth->readStdin(); }