  def add_toy
    Log.add_info(request, params.inspect)

    return unless request.post?

    if @login_user.nil?
      render(:text => '0')
      return
    end

    toy = Toy.new

    toy.user_id = @login_user.id
    toy.xtype = params[:xtype]
    toy.target_id = params[:target_id].to_i
    toy.x, toy.y = DesktopsHelper.find_empty_block(@login_user)
    toy.save!

    render(:text => toy.id.to_s)
  end
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.