def task_remove(request, task_id):
    """
    remove task by task_id
    :param request:
    :return:
    """
    if request.method == 'POST':
        try:
            # delete job from DjangoJob
            task = Task.objects.get(id=task_id)
            clients = clients_of_task(task)
            for client in clients:
                job_id = get_job_id(client, task)
                DjangoJob.objects.filter(name=job_id).delete()
            # delete task
            Task.objects.filter(id=task_id).delete()
            return JsonResponse({'result': '1'})
        except:
            return JsonResponse({'result': '0'})
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.