Forbid non-CLI access to command-line scripts
[friendica.git/.git] / bin / auth_ejabberd.php
index fa71faf..e921829 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;