sentry-raven 2.6.0 → 2.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9a90db025f175635bb089674602bd66c1d5dfe1
4
- data.tar.gz: 44d3c2baa95de9c91ebc5de66967a8046e1ce8ae
3
+ metadata.gz: 492ac8036f2f1a02ec925196ee01e9e7a8719a0e
4
+ data.tar.gz: 15769839c7060ad049168680b620fb58f9faa1f5
5
5
  SHA512:
6
- metadata.gz: a8a454427885043f2647bd4cb74d8d9856187fea01f0830c30ffaf32c97024dc8705e7f59edcf2008890138501da5459fa1786bcca89813cff7e493e318d98d3
7
- data.tar.gz: e6d8d7c3f3abfb12168a5d023eed5b8858e40a145c9e90426c3e759eb58d88713eb2bc1a079b68ae6cef9d80fc3f24425d33ce036451e0df6aaa360916c05bf1
6
+ metadata.gz: 765c2b840c6b5741be982ef814f907dc214aa77625487856a829e7365748d474ed4d058b46fb29d2afef184de3c0e70e29f87c3504ee518c704d629d57a2389b
7
+ data.tar.gz: 147881f36841706e57863f9a27f01b289a9207dc14360fd29018c8dd4caba6b8d5adbdeaf783748a5f2fc6e8b1db46341b5b77a7fa420306b2a8b44d76feced4
@@ -1,3 +1,9 @@
1
+ 2.6.1
2
+ -----
3
+
4
+ * BUGFIX: Fix cases where ActionDispatch::RemoteIP would blow up during event creation [@cmoylan, #722]
5
+ * BUGFIX: In ActiveJob, don't report exceptions which can be rescued by rescue_from handlers [@bensheldon, #719]
6
+
1
7
  2.6.0
2
8
  -----
3
9
 
@@ -94,22 +94,30 @@ module Raven
94
94
 
95
95
  def format_headers_for_sentry(env_hash)
96
96
  env_hash.each_with_object({}) do |(key, value), memo|
97
- key = key.to_s # rack env can contain symbols
98
- value = value.to_s
99
- next unless key.upcase == key # Non-upper case stuff isn't either
100
-
101
- # Rack adds in an incorrect HTTP_VERSION key, which causes downstream
102
- # to think this is a Version header. Instead, this is mapped to
103
- # env['SERVER_PROTOCOL']. But we don't want to ignore a valid header
104
- # if the request has legitimately sent a Version header themselves.
105
- # See: https://github.com/rack/rack/blob/028438f/lib/rack/handler/cgi.rb#L29
106
- next if key == 'HTTP_VERSION' && value == env_hash['SERVER_PROTOCOL']
107
-
108
- next unless key.start_with?('HTTP_') || %w(CONTENT_TYPE CONTENT_LENGTH).include?(key)
109
- # Rack stores headers as HTTP_WHAT_EVER, we need What-Ever
110
- key = key.gsub("HTTP_", "")
111
- key = key.split('_').map(&:capitalize).join('-')
112
- memo[key] = value
97
+ begin
98
+ key = key.to_s # rack env can contain symbols
99
+ value = value.to_s
100
+ next unless key.upcase == key # Non-upper case stuff isn't either
101
+
102
+ # Rack adds in an incorrect HTTP_VERSION key, which causes downstream
103
+ # to think this is a Version header. Instead, this is mapped to
104
+ # env['SERVER_PROTOCOL']. But we don't want to ignore a valid header
105
+ # if the request has legitimately sent a Version header themselves.
106
+ # See: https://github.com/rack/rack/blob/028438f/lib/rack/handler/cgi.rb#L29
107
+ next if key == 'HTTP_VERSION' && value == env_hash['SERVER_PROTOCOL']
108
+
109
+ next unless key.start_with?('HTTP_') || %w(CONTENT_TYPE CONTENT_LENGTH).include?(key)
110
+ # Rack stores headers as HTTP_WHAT_EVER, we need What-Ever
111
+ key = key.gsub("HTTP_", "")
112
+ key = key.split('_').map(&:capitalize).join('-')
113
+ memo[key] = value
114
+ rescue StandardError => e
115
+ # Rails adds objects to the Rack env that can sometimes raise exceptions
116
+ # when `to_s` is called.
117
+ # See: https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/middleware/remote_ip.rb#L134
118
+ Raven.logger.warn("Error raised while formatting headers: #{e.message}")
119
+ next
120
+ end
113
121
  end
114
122
  end
115
123
 
@@ -17,6 +17,7 @@ module Raven
17
17
  def capture_and_reraise_with_sentry(job, block)
18
18
  block.call
19
19
  rescue Exception => exception # rubocop:disable Lint/RescueException
20
+ return if rescue_with_handler(exception)
20
21
  return if already_supported_by_specific_integration?(job)
21
22
  Raven.capture_exception(exception, :extra => raven_context(job))
22
23
  raise exception
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module Raven
3
3
  # Freezing this constant breaks in 1.9.x
4
- VERSION = "2.6.0" # rubocop:disable Style/MutableConstant
4
+ VERSION = "2.6.1" # rubocop:disable Style/MutableConstant
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentry-raven
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sentry Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-19 00:00:00.000000000 Z
11
+ date: 2017-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday