Skip to content

Commit

Permalink
QA: Prevent CLI scripts from running under the browser
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWitness committed Feb 18, 2024
1 parent a1884d5 commit a56b28e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/global.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@

if (isset($no_http_headers) && $no_http_headers == true) {
$config['is_web'] = false;

if (isset($_REQUEST)) {
print 'FATAL: This file can only be called from the command line.' . PHP_EOL;
exit;
}
}

if ($config['is_web'] && ini_get('session.auto_start') == 1) {
Expand Down

0 comments on commit a56b28e

Please sign in to comment.