sentry-raven 0.11.1 → 0.11.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sentry-raven might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/raven/okjson.rb +1 -1
- data/lib/raven/processor/sanitizedata.rb +23 -9
- data/lib/raven/transports/http.rb +3 -1
- data/lib/raven/version.rb +1 -1
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 183f7bb0f9258b5240479894362ea94c69874fd9
|
4
|
+
data.tar.gz: 146ab626134eccee42463bde492a45a47ade0e17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 712128a1d219122988b9f1a6891fdb3de5d7d3a43885020c0f4f0bd2105b677200015dc222909e078d99168968f8cbca96a4138ef286f6614d249b6471ab3888
|
7
|
+
data.tar.gz: d34a51caadd2fdec5126a71ff987a8a07c7d501410b5cea1b957dc409b0b056d4013d43c1bbf135c1346fa3ababaae88fc1a6278ae2de9c3bbcf9c788078b57b
|
data/lib/raven/okjson.rb
CHANGED
@@ -6,20 +6,34 @@ module Raven
|
|
6
6
|
VALUES_RE = /^\d{16}$/
|
7
7
|
|
8
8
|
def process(value)
|
9
|
-
value.
|
10
|
-
if v.
|
9
|
+
value.inject(value) do |value,(k,v)|
|
10
|
+
v = k if v.nil?
|
11
|
+
if v.is_a?(Hash) || v.is_a?(Array)
|
11
12
|
process(v)
|
12
|
-
elsif v.is_a?(String) && (
|
13
|
+
elsif v.is_a?(String) && (json = parse_json_or_nil(v))
|
13
14
|
#if this string is actually a json obj, convert and sanitize
|
14
|
-
process(
|
15
|
-
elsif v.is_a?(Integer) && (VALUES_RE.match(v.to_s) || FIELDS_RE.match(k))
|
16
|
-
INT_MASK
|
17
|
-
elsif VALUES_RE.match(v.to_s) || FIELDS_RE.match(k)
|
18
|
-
STRING_MASK
|
15
|
+
value = modify_in_place(value, [k,v], process(json).to_json)
|
16
|
+
elsif v.is_a?(Integer) && (VALUES_RE.match(v.to_s) || FIELDS_RE.match(k.to_s))
|
17
|
+
value = modify_in_place(value, [k,v], INT_MASK)
|
18
|
+
elsif VALUES_RE.match(v.to_s) || FIELDS_RE.match(k.to_s)
|
19
|
+
value = modify_in_place(value, [k,v], STRING_MASK)
|
19
20
|
else
|
20
|
-
|
21
|
+
value
|
21
22
|
end
|
22
23
|
end
|
24
|
+
value
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def modify_in_place(original_parent, original_child, new_child)
|
30
|
+
if original_parent.is_a?(Array)
|
31
|
+
index = original_parent.index(original_child[0])
|
32
|
+
original_parent[index] = new_child
|
33
|
+
elsif original_parent.is_a?(Hash)
|
34
|
+
original_parent[original_child[0]] = new_child
|
35
|
+
end
|
36
|
+
original_parent
|
23
37
|
end
|
24
38
|
end
|
25
39
|
end
|
@@ -9,7 +9,9 @@ module Raven
|
|
9
9
|
|
10
10
|
def send(auth_header, data, options = {})
|
11
11
|
project_id = self.configuration[:project_id]
|
12
|
-
|
12
|
+
path = self.configuration[:path].gsub('/sentry', '') + "/"
|
13
|
+
|
14
|
+
response = conn.post "#{path}api/#{project_id}/store/" do |req|
|
13
15
|
req.headers['Content-Type'] = options[:content_type]
|
14
16
|
req.headers['X-Sentry-Auth'] = auth_header
|
15
17
|
req.body = data
|
data/lib/raven/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sentry-raven
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
- David Cramer
|
7
|
+
- Sentry Team
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-07 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: faraday
|
@@ -110,7 +109,7 @@ dependencies:
|
|
110
109
|
- !ruby/object:Gem::Version
|
111
110
|
version: '0'
|
112
111
|
description:
|
113
|
-
email:
|
112
|
+
email: getsentry@googlegroups.com
|
114
113
|
executables:
|
115
114
|
- raven
|
116
115
|
extensions: []
|