sentry-sanitizer 0.1.3 → 0.1.4

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
  SHA256:
3
- metadata.gz: 14c3591414c43811641c73deace5e0937ea6b6253fccfab7118a78e80570ee97
4
- data.tar.gz: 4a56c57f3c8544ad6f60e3a39391a434062e959cb98df9d0664d01d9f237af6c
3
+ metadata.gz: ce13accdd4d90cccb1820625ef2d167a765e077b3837cf2d8341d2e945c3f735
4
+ data.tar.gz: 948e32dee0448aa61a1897328806fcacd1ac392179b502fb7ab09a0cf78cb21d
5
5
  SHA512:
6
- metadata.gz: bb59ac96c1f7a8cabe2f592a2cdb7cb28563d934a817258d2bd477c9a53be9acad75672818504329b7cf38f11492ba193de4bfd1a3a067bc3b83c01d3a349dc9
7
- data.tar.gz: ce941998005146bd0c32d4200cd1cae8dec74303de8d4f460dbac02f665f3ef8685153374cabb6de7f4ae044f2df75563aa430a99817dd06c23d26d10e3cb7eb
6
+ metadata.gz: e4863aeb41c575268039a9eda51a04aa78057fb41e3238ed1ba075be7020e395b9f526551fc0684cb39838101067c89441cd0d5a6eb5ef0ca3dfed3ed24320a0
7
+ data.tar.gz: cb5ec02b1a3604da2c636226ced1db9bd590ecd767f7bf083582911a211a22f79fc2ae3c55a27e5d944cdcc86b65861eb94bc6c1c2ef1730905ef9ca4a01be3e
@@ -1,12 +1,6 @@
1
1
  module Sentry
2
2
  module Sanitizer
3
3
  class Cleaner
4
- HOOK = ->(event, hint) do
5
- Sentry::Sanitizer::Cleaner.new(Sentry.configuration.sanitize).call(event)
6
-
7
- event
8
- end.freeze
9
-
10
4
  DEFAULT_MASK = '[FILTERED]'.freeze
11
5
  DEFAULT_SENSITIVE_HEADERS = %w[
12
6
  Authorization
@@ -23,7 +17,7 @@ module Sentry
23
17
 
24
18
  def call(event)
25
19
  if event.is_a?(Sentry::Event)
26
- event.request = sanitize_request(event.request) if event.request
20
+ sanitize_request(event.request) if event.request
27
21
  event.extra = sanitize_data(event.extra) if event.extra
28
22
  end
29
23
  end
@@ -8,7 +8,11 @@ module Sentry
8
8
  prepend Sentry::Sanitizer::ConfigurationMixin
9
9
 
10
10
  add_post_initialization_callback do
11
- self.before_send = Sentry::Sanitizer::Cleaner::HOOK
11
+ self.before_send = ->(event, hint) do
12
+ Sentry::Sanitizer::Cleaner.new(Sentry.configuration.sanitize).call(event)
13
+
14
+ event
15
+ end
12
16
  end
13
17
  end
14
18
 
@@ -13,8 +13,8 @@ module Sentry
13
13
  @before_send_hook_list << value
14
14
 
15
15
  @before_send = ->(event, hint) {
16
- @before_send_hook_list.inject do |_, hook|
17
- hook.call(event, hint)
16
+ @before_send_hook_list.each do |hook|
17
+ event = hook.call(event, hint)
18
18
  end
19
19
 
20
20
  event
@@ -1,5 +1,5 @@
1
1
  module Sentry
2
2
  module Sanitizer
3
- VERSION = '0.1.3'
3
+ VERSION = '0.1.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentry-sanitizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Valentine Kiselev