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

    return unless request.post?

    SqlHelper.validate_token([params[:status]])

    team_id = params[:team_id]
    begin
      team = Team.find(team_id)
      team.update_status(params[:status])

      @item = team.item

      flash[:notice] = t('msg.update_success')

    rescue => evar
      Log.add_error(request, evar)
      flash[:notice] = evar.to_s
    end

    render(:partial => 'ajax_team_status', :layout => false)
  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.