From cf08c1aba4726a0b3e1156c96f830a07835a0a04 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Sat, 4 Feb 2023 15:08:42 +0100 Subject: [PATCH] Only allow from CLI #907 --- integrations/cyberpanel/install.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/integrations/cyberpanel/install.php b/integrations/cyberpanel/install.php index d388405c8..eeee31690 100644 --- a/integrations/cyberpanel/install.php +++ b/integrations/cyberpanel/install.php @@ -6,6 +6,10 @@ */ 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); spl_autoload_register(function($sClassName){