]> git.mxchange.org Git - friendica.git/blobdiff - bin/auth_ejabberd.php
typo
[friendica.git] / bin / auth_ejabberd.php
index f00615f02be452a4b0e3ae458d903e4c6e13fe71..e9218291633cfb5f1d597e6166dd2f27417aee69 100755 (executable)
  *
  */
 
+if (php_sapi_name() !== 'cli') {
+       header($_SERVER["SERVER_PROTOCOL"] . ' 403 Forbidden');
+       exit();
+}
+
 use Dice\Dice;
 use Friendica\App\Mode;
 use Friendica\Util\ExAuth;
@@ -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();
 }