sqreen 1.3.01487852305 → 1.3.11488790967
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sqreen.rb +4 -4
- data/lib/sqreen/frameworks/generic.rb +5 -0
- data/lib/sqreen/frameworks/rails.rb +1 -1
- data/lib/sqreen/frameworks/sinatra.rb +1 -1
- data/lib/sqreen/instrumentation.rb +6 -6
- data/lib/sqreen/rules_callbacks/execjs.rb +2 -2
- data/lib/sqreen/runner.rb +2 -2
- data/lib/sqreen/session.rb +2 -2
- data/lib/sqreen/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60309088594b8452aae2b0a578a70b4b87968510
|
4
|
+
data.tar.gz: 3eb47fe19bea321386d26740369859f1631e9579
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0beaa1a34409e53c11e773cc67e003c5a3fc464f9ce06adf8a684d0a740de39c01231aec557cca4670941ef4b6ff094375c58ea03c48357829630725fa36154b
|
7
|
+
data.tar.gz: 89e0ded5ca9a7be02a000a736ddefc69dd04bb7435f9f3cb27fd377a8bcfc04baff036aec531b801dbadc68ba40b5872a9d7e61e20ecc5b86795620a1359da8a
|
data/lib/sqreen.rb
CHANGED
@@ -37,7 +37,7 @@ Sqreen.framework.on_start do |framework|
|
|
37
37
|
Sqreen.log.error "Sorry but your Sqreen token appears to be invalid.\nYour application is NOT currently protected by Sqreen.\n\nHave you correctly filled your config/sqreen.yml?\n\n"
|
38
38
|
rescue Exception => e
|
39
39
|
Sqreen.log.error e.inspect
|
40
|
-
Sqreen.log.
|
40
|
+
Sqreen.log.debug e.backtrace.join("\n")
|
41
41
|
if runner
|
42
42
|
# immediately post exception
|
43
43
|
runner.session.post_sqreen_exception(Sqreen::RemoteException.new(e))
|
@@ -45,15 +45,15 @@ Sqreen.framework.on_start do |framework|
|
|
45
45
|
begin
|
46
46
|
runner.remove_instrumentation
|
47
47
|
rescue => remove_exception
|
48
|
-
Sqreen.log.
|
49
|
-
# We did not
|
48
|
+
Sqreen.log.debug(remove_exception.inspect)
|
49
|
+
# We did not manage to remove instrumentation, state is unclear:
|
50
50
|
# terminate thread
|
51
51
|
return nil
|
52
52
|
end
|
53
53
|
begin
|
54
54
|
runner.logout(false)
|
55
55
|
rescue => logout_exception
|
56
|
-
Sqreen.log.
|
56
|
+
Sqreen.log.debug(logout_exception.inspect)
|
57
57
|
nil
|
58
58
|
end
|
59
59
|
end
|
@@ -27,7 +27,7 @@ module Sqreen
|
|
27
27
|
adapter_name = adapter.class.const_get 'ADAPTER_NAME'
|
28
28
|
rescue
|
29
29
|
# FIXME: we may want to log that
|
30
|
-
Sqreen.log.
|
30
|
+
Sqreen.log.warn 'cannot find ADAPTER_NAME'
|
31
31
|
return nil
|
32
32
|
end
|
33
33
|
db_type = DB_MAPPING[adapter_name]
|
@@ -72,8 +72,8 @@ module Sqreen
|
|
72
72
|
end
|
73
73
|
returns << res
|
74
74
|
rescue => e
|
75
|
-
Sqreen.log.
|
76
|
-
Sqreen.log.
|
75
|
+
Sqreen.log.warn "we catch an exception: #{e.inspect}"
|
76
|
+
Sqreen.log.debug e.backtrace
|
77
77
|
if cb.respond_to?(:record_exception)
|
78
78
|
cb.record_exception(e)
|
79
79
|
else
|
@@ -108,8 +108,8 @@ module Sqreen
|
|
108
108
|
end
|
109
109
|
returns << res
|
110
110
|
rescue => e
|
111
|
-
Sqreen.log.
|
112
|
-
Sqreen.log.
|
111
|
+
Sqreen.log.warn "we catch an exception: #{e.inspect}"
|
112
|
+
Sqreen.log.debug e.backtrace
|
113
113
|
if cb.respond_to?(:record_exception)
|
114
114
|
cb.record_exception(e)
|
115
115
|
else
|
@@ -144,8 +144,8 @@ module Sqreen
|
|
144
144
|
end
|
145
145
|
returns << res
|
146
146
|
rescue => e
|
147
|
-
Sqreen.log.
|
148
|
-
Sqreen.log.
|
147
|
+
Sqreen.log.warn "we catch an exception: #{e.inspect}"
|
148
|
+
Sqreen.log.debug e.backtrace
|
149
149
|
if cb.respond_to?(:record_exception)
|
150
150
|
cb.record_exception(e)
|
151
151
|
else
|
@@ -101,8 +101,8 @@ module Sqreen
|
|
101
101
|
args_override = build_accessor(args_override) if args_override
|
102
102
|
end
|
103
103
|
rescue => e
|
104
|
-
Sqreen.log.
|
105
|
-
Sqreen.log.
|
104
|
+
Sqreen.log.warn "we catch a JScb exception: #{e.inspect}"
|
105
|
+
Sqreen.log.debug e.backtrace
|
106
106
|
record_exception(e, :cb => name, :args => arguments)
|
107
107
|
nil
|
108
108
|
end
|
data/lib/sqreen/runner.rb
CHANGED
@@ -102,8 +102,8 @@ module Sqreen
|
|
102
102
|
end
|
103
103
|
wanted_features = conf_features
|
104
104
|
rescue
|
105
|
-
Sqreen.log.
|
106
|
-
"NOT using
|
105
|
+
Sqreen.log.warn do
|
106
|
+
"NOT using invalid inital features #{conf_initial_features}"
|
107
107
|
end
|
108
108
|
end
|
109
109
|
end
|
data/lib/sqreen/session.rb
CHANGED
@@ -133,7 +133,7 @@ module Sqreen
|
|
133
133
|
return yield
|
134
134
|
rescue => e
|
135
135
|
|
136
|
-
Sqreen.log.
|
136
|
+
Sqreen.log.debug(e.inspect)
|
137
137
|
|
138
138
|
current_retry += 1
|
139
139
|
|
@@ -311,7 +311,7 @@ module Sqreen
|
|
311
311
|
def post_sqreen_exception(exception)
|
312
312
|
post('sqreen_exception', exception.to_hash, {}, 5)
|
313
313
|
rescue *NET_ERRORS => e
|
314
|
-
Sqreen.log.
|
314
|
+
Sqreen.log.warn(format('Could not post exception (network down? %s) %s',
|
315
315
|
e.inspect,
|
316
316
|
exception.to_hash.inspect))
|
317
317
|
nil
|
data/lib/sqreen/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sqreen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.11488790967
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sqreen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: execjs
|