Forbid non-CLI access to command-line scripts

This commit is contained in:
Hypolite Petovan
2020-09-07 05:51:26 -04:00
parent 3bd8b81154
commit 06632536f3
6 changed files with 29 additions and 0 deletions

View File

@@ -21,6 +21,11 @@
* Starts the background processing
*/
if (php_sapi_name() !== 'cli') {
header($_SERVER["SERVER_PROTOCOL"] . ' 403 Forbidden');
exit();
}
use Dice\Dice;
use Friendica\App;
use Friendica\Core\Update;