Sha256: be247ec7284dbb4dfd4b977307b64049f1dc9dbc839f843b07d8c80f7d395bb1

Contents?: true

Size: 750 Bytes

Versions: 29

Compression:

Stored size: 750 Bytes

Contents

module Raven
  class Processor::Cookies < Processor
    def process(data)
      process_if_symbol_keys(data) if data[:request]
      process_if_string_keys(data) if data["request"]

      data
    end

    private

    def process_if_symbol_keys(data)
      data[:request][:cookies] = STRING_MASK if data[:request][:cookies]

      return unless data[:request][:headers] && data[:request][:headers]["Cookie"]
      data[:request][:headers]["Cookie"] = STRING_MASK
    end

    def process_if_string_keys(data)
      data["request"]["cookies"] = STRING_MASK if data["request"]["cookies"]

      return unless data["request"]["headers"] && data["request"]["headers"]["Cookie"]
      data["request"]["headers"]["Cookie"] = STRING_MASK
    end
  end
end

Version data entries

29 entries across 29 versions & 3 rubygems

Version Path
sentry-raven-3.0.0 lib/raven/processor/cookies.rb
sentry-raven-2.13.0 lib/raven/processor/cookies.rb
sentry-raven-2.12.3 lib/raven/processor/cookies.rb
sentry-raven-2.12.2 lib/raven/processor/cookies.rb
sentry-raven-2.12.1 lib/raven/processor/cookies.rb
sentry-raven-2.12.0 lib/raven/processor/cookies.rb
sentry-raven-2.11.3 lib/raven/processor/cookies.rb
sentry-raven-2.11.2 lib/raven/processor/cookies.rb
sentry-raven-2.11.1 lib/raven/processor/cookies.rb
sentry-raven-2.11.0 lib/raven/processor/cookies.rb
sentry-raven-2.10.0 lib/raven/processor/cookies.rb
sentry-raven-2.9.0 lib/raven/processor/cookies.rb
sentry-raven-2.8.0 lib/raven/processor/cookies.rb
sentry-raven-2.7.4 lib/raven/processor/cookies.rb
sentry-raven-2.7.3 lib/raven/processor/cookies.rb
jones-gem-2.7.2 lib/raven/processor/cookies.rb
alec-gem-2.7.2 lib/raven/processor/cookies.rb
sentry-raven-2.7.2 lib/raven/processor/cookies.rb
sentry-raven-2.7.1 lib/raven/processor/cookies.rb
sentry-raven-2.6.3 lib/raven/processor/cookies.rb