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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce13accdd4d90cccb1820625ef2d167a765e077b3837cf2d8341d2e945c3f735
|
4
|
+
data.tar.gz: 948e32dee0448aa61a1897328806fcacd1ac392179b502fb7ab09a0cf78cb21d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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 =
|
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
|
|