		$event = mysqli_fetch_assoc($result);

		if($queue == "active"){
			$ged_command = "-drop -type $ged_type_nbr -queue $queue ";
			foreach ($array_ged_packets as $key => $value) {
				if($value["key"] == true){
					$ged_command .= "\"".$event[$key]."\" ";
				}
			}
			$ged_command = trim($ged_command, " ");

			shell_exec($path_ged_bin." ".$ged_command);
			logging("ged_update",$ged_command);
		} else {
			$id_list .= $id.",";
		}
	}

	if($queue == "history"){
		$id_list = trim($id_list, ",");
		$ged_command = "-drop -id ".$id_list." -queue history";

		shell_exec($path_ged_bin." ".$ged_command);
		logging("ged_update",$ged_command);
	}
}
The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.