mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-18 04:20:05 +02:00
change cli detection to use php_sapi_name()
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
|
||||
chdir(dirname(__FILE__)); // to enable our relative pathes to work
|
||||
|
||||
if (isset($_SERVER['HTTP_HOST'])) // security precaution: forbit calling admin-cli as web-page
|
||||
if (php_sapi_name() !== 'cli') // security precaution: forbit calling admin-cli as web-page
|
||||
{
|
||||
die('<h1>admin-cli.php must NOT be called as web-page --> exiting !!!</h1>');
|
||||
}
|
||||
|
Reference in New Issue
Block a user