From 71ce8e24774dd695fb1af4588e2e47bb9c11c5fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 2 Aug 2022 15:50:27 +0200 Subject: [PATCH] Check if exec is available before calling --- proxy.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proxy.php b/proxy.php index d7f3c24..630188f 100644 --- a/proxy.php +++ b/proxy.php @@ -140,7 +140,8 @@ function checkCoolwsdSetup() if (!is_executable($appImage)) return 'appimage_not_executable'; - if (@exec('echo EXEC') !== "EXEC") + $disabledFunctions = explode(',', ini_get('disable_functions')); + if (!in_array('exec', $disabledFunctions) || @exec('echo EXEC') !== "EXEC") return 'exec_disabled'; exec("LD_TRACE_LOADED_OBJECTS=1 $appImage", $output, $return);