def create(request, comment_id):
    comment = get_object_or_404(
        Comment.objects.exclude(user=request.user),
        pk=comment_id)
    form = LikeForm(
        user=request.user,
        comment=comment,
        data=post_data(request))

    if is_post(request) and form.is_valid():
        like = form.save()
        like.comment.increase_likes_count()

        if is_ajax(request):
            return json_response({'url_delete': like.get_delete_url()})

        return redirect(request.POST.get('next', comment.get_absolute_url()))

    return render(
        request=request,
        template_name='spirit/comment/like/create.html',
        context={
            'form': form,
            'comment': comment})
A web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a Redirect. This simplifies phishing attacks.