Forbid non-CLI access to command-line scripts
[friendica.git/.git] / bin / wait-for-connection
index b6c03a6..de860e9 100755 (executable)
  * Usage: php bin/wait-for-connection {HOST} {PORT} [{TIMEOUT}]
  */
 
+if (php_sapi_name() !== 'cli') {
+       header($_SERVER["SERVER_PROTOCOL"] . ' 403 Forbidden');
+       exit();
+}
+
 $timeout = 60;
 switch ($argc) {
        case 4: