- correcting safe_exec check in function.safe_exec.php, fixes #56

This commit is contained in:
Michael Kaufmann (d00p)
2010-03-10 12:19:20 +00:00
parent 6f37aa2209
commit ee7f83aede

View File

@@ -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;