Skip to content

Commit

Permalink
Check if exec is available before calling
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusknorr authored and timar committed Oct 21, 2022
1 parent 3676762 commit 71ce8e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 71ce8e2

Please sign in to comment.