Only allow from CLI #907

This commit is contained in:
the-djmaze 2023-02-04 15:08:42 +01:00
parent 7671503562
commit cf08c1aba4

View file

@ -6,6 +6,10 @@
*/ */
define('SNAPPYMAIL_PUBLIC_DIR', '/usr/local/CyberCP/public/snappymail'); define('SNAPPYMAIL_PUBLIC_DIR', '/usr/local/CyberCP/public/snappymail');
if (PHP_SAPI !== 'cli' && false === stripos(php_sapi_name(), 'cli')) {
exit('not cli');
}
chdir(SNAPPYMAIL_PUBLIC_DIR); chdir(SNAPPYMAIL_PUBLIC_DIR);
spl_autoload_register(function($sClassName){ spl_autoload_register(function($sClassName){