sentry-sanitizer 0.1.2 → 0.1.3
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: 14c3591414c43811641c73deace5e0937ea6b6253fccfab7118a78e80570ee97
|
4
|
+
data.tar.gz: 4a56c57f3c8544ad6f60e3a39391a434062e959cb98df9d0664d01d9f237af6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb59ac96c1f7a8cabe2f592a2cdb7cb28563d934a817258d2bd477c9a53be9acad75672818504329b7cf38f11492ba193de4bfd1a3a067bc3b83c01d3a349dc9
|
7
|
+
data.tar.gz: ce941998005146bd0c32d4200cd1cae8dec74303de8d4f460dbac02f665f3ef8685153374cabb6de7f4ae044f2df75563aa430a99817dd06c23d26d10e3cb7eb
|
@@ -24,18 +24,18 @@ module Sentry
|
|
24
24
|
def call(event)
|
25
25
|
if event.is_a?(Sentry::Event)
|
26
26
|
event.request = sanitize_request(event.request) if event.request
|
27
|
-
event.extra =
|
27
|
+
event.extra = sanitize_data(event.extra) if event.extra
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
31
|
def sanitize_request(request)
|
32
|
-
request.data =
|
32
|
+
request.data = sanitize_data(request.data) unless fields.size.zero?
|
33
33
|
request.headers = sanitize_headers(request.headers) unless http_headers.size.zero?
|
34
34
|
request.cookies = sanitize_cookies(request.cookies) if cookies
|
35
35
|
end
|
36
36
|
|
37
|
-
def
|
38
|
-
return
|
37
|
+
def sanitize_data(hash)
|
38
|
+
return unless hash.is_a? Hash
|
39
39
|
|
40
40
|
sanitize_value(hash, nil)
|
41
41
|
end
|
@@ -13,9 +13,11 @@ module Sentry
|
|
13
13
|
@before_send_hook_list << value
|
14
14
|
|
15
15
|
@before_send = ->(event, hint) {
|
16
|
-
@before_send_hook_list.
|
17
|
-
|
16
|
+
@before_send_hook_list.inject do |_, hook|
|
17
|
+
hook.call(event, hint)
|
18
18
|
end
|
19
|
+
|
20
|
+
event
|
19
21
|
}
|
20
22
|
end
|
21
23
|
|