Project

General

Profile

Revision b20500a9

Added by Thomas McKay almost 2 years ago

fixes #24370 - don't log binary upload contents

View differences:

lib/runcible/base.rb
30 30
    end
31 31

  
32 32
    # rubocop:disable Metrics/AbcSize:
33
    # rubocop:disable PerceivedComplexity
33 34
    def call(method, path, options = {})
34 35
      self.logs = []
35 36
      clone_config = self.config.clone
......
67 68
      args = [method]
68 69
      args << generate_payload(options) if [:post, :put].include?(method)
69 70
      args << headers
71
      starting_arg = options[:no_log_payload] == true ? 2 : 1
72
      self.logs << ([method.upcase, URI.join(client.url, path)] + args[starting_arg..-1]).join(': ')
70 73

  
71
      self.logs << ([method.upcase, URI.join(client.url, path)] + args[1..-1]).join(': ')
72 74
      response = get_response(client, path, *args)
73 75
      processed = process_response(response)
74 76
      self.logs << "Response: #{response.code}: #{response.body}"
lib/runcible/resources/content.rb
27 27
      # @param  [File]    content    content of the file being uploaded to the server
28 28
      # @return  [RestClient::Response] none
29 29
      def upload_bits(upload_id, offset, content)
30
        call(:put, upload_path("#{upload_id}/#{offset}/"), :payload => content)
30
        call(:put, upload_path("#{upload_id}/#{offset}/"), :payload => content, :no_log_payload => true)
31 31
      end
32 32

  
33 33
      # Import into a repository

Also available in: Unified diff