- correcting safe_exec check in function.safe_exec.php, fixes #56
This commit is contained in:
@@ -82,7 +82,7 @@ function safe_exec($exec_string, &$return_value = false)
|
||||
$ok = false;
|
||||
foreach($allowed_commands as $allowed_command)
|
||||
{
|
||||
if(strpos($exec_string, $allowed_command) == 0
|
||||
if(strpos($exec_string, $allowed_command) === 0
|
||||
&& (strlen($exec_string) === ($allowed_command_pos = strlen($allowed_command)) || substr($exec_string, $allowed_command_pos, 1) === ' '))
|
||||
{
|
||||
$ok = true;
|
||||
|
||||
Reference in New Issue
Block a user