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

    return unless request.post?

    categories = [:general, :menu, :topic, :note, :smtp, :feed, :user, :log]

    yaml = ApplicationHelper.get_config_yaml

    categories.each do |cat|
      next if params[cat].nil? or params[cat].empty?

      yaml[cat] = Hash.new if yaml[cat].nil?

      params[cat].each do |key, val|
        if cat == :general
          case key
            when 'symbol_image'
              ConfigHelper.save_img('symbol.png', val) if val.size > 0
            else
              yaml[cat][key] = val
          end
        elsif cat == :topic
          case key
            when 'src'
              ConfigHelper.save_html('topics.html', val) if val.size > 0
            else
              yaml[cat][key] = val
          end
        elsif cat == :note
          case key
            when 'src'
              ConfigHelper.save_html('note.html', val) if val.size > 0
            else
              yaml[cat][key] = val
          end
        else
          if params[:smtp]['auth_enabled'] == '0'
            val = nil if ['auth', 'user_name', 'password'].include?(key)
          end
          yaml[cat][key] = val
        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.