https://reisub.nsupdate.info/git
/
friendica.git
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Forbid non-CLI access to command-line scripts
[friendica.git/.git]
/
bin
/
wait-for-connection
diff --git
a/bin/wait-for-connection
b/bin/wait-for-connection
index
b6c03a6
..
de860e9
100755
(executable)
--- a/
bin/wait-for-connection
+++ b/
bin/wait-for-connection
@@
-24,6
+24,11
@@
* 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: