sqreen 1.10.4 → 1.10.5
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: 6bae9742df8ac58f676ca59e60ab6570b34e5eb0d047d5cf92a54de5a3ad5e49
|
4
|
+
data.tar.gz: 1be42ec423e7ed92db41b14fdf3acb3827bdaa0ad0d66b9282a0d2a5ccf9bdfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 128229a04099d1e02ebc6170417f1e029831f0c4fb5396746702d212671b021632b63121059db8e742ba065e8266a426a016907b85fb3348c370664ae69bd096
|
7
|
+
data.tar.gz: 5576e98b242e0f1a117289a11f49ac486b49e34d04aafa325e237cf4f231e96aa903140aadfb712b454f38f33adb8a7a4335245fdd6a60d91decc8a7ad1174f4
|
data/lib/sqreen/callback_tree.rb
CHANGED
@@ -41,32 +41,28 @@ module Sqreen
|
|
41
41
|
def get(klass, method, type = nil)
|
42
42
|
k = @by_class[klass]
|
43
43
|
unless k
|
44
|
-
log
|
45
|
-
log
|
44
|
+
Sqreen.log.debug { format('Error: no cb registered for class %s (%s)', klass.inspect, klass.class) }
|
45
|
+
Sqreen.log.debug { inspect }
|
46
46
|
return []
|
47
47
|
end
|
48
48
|
cbs = k[method]
|
49
49
|
unless cbs
|
50
|
-
log
|
51
|
-
log(inspect)
|
50
|
+
Sqreen.log.debug { format('Error: no cbs registered for method %s.%s', klass, method) }
|
51
|
+
Sqreen.log.debug { log(inspect) }
|
52
52
|
return []
|
53
53
|
end
|
54
54
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
return res.to_a
|
61
|
-
else
|
62
|
-
return cbs[type]
|
63
|
-
end
|
55
|
+
return cbs[type] unless type.nil?
|
56
|
+
|
57
|
+
res = Set.new
|
58
|
+
cbs.each_value { |v| res += v }
|
59
|
+
res.to_a
|
64
60
|
end
|
65
61
|
|
66
62
|
def each
|
67
|
-
@by_class.
|
68
|
-
values.
|
69
|
-
cbs.
|
63
|
+
@by_class.each_value do |values|
|
64
|
+
values.each_value do |cbs|
|
65
|
+
cbs.each_value do |cb_ary|
|
70
66
|
cb_ary.each do |cb|
|
71
67
|
yield cb
|
72
68
|
end
|
@@ -104,6 +104,7 @@ module Sqreen
|
|
104
104
|
|
105
105
|
# SQREEN-880 - prevent Sqreen startup on Sidekiq workers
|
106
106
|
return :sidekiq_cli if defined?(Sidekiq::CLI)
|
107
|
+
return :delayed_job if defined?(Delayed::Command)
|
107
108
|
|
108
109
|
# Prevent Sqreen startup on rake tasks - unless this is a Sqreen test
|
109
110
|
return :rake if !run_in_test && $0.end_with?('rake')
|
@@ -9,6 +9,7 @@ module Sqreen
|
|
9
9
|
module Rules
|
10
10
|
# Callback that match on a list or matcher+binding accessor
|
11
11
|
class BindingAccessorMatcherCB < RuleCB
|
12
|
+
MAX_LENGTH = 1024 * 128
|
12
13
|
attr_reader :rules
|
13
14
|
|
14
15
|
# matcher on one elem
|
@@ -58,6 +59,7 @@ module Sqreen
|
|
58
59
|
next if val.respond_to?(:seek)
|
59
60
|
val.each do |v|
|
60
61
|
next if !v.is_a?(String) || (!matcher.min_size.nil? && v.size < matcher.min_size)
|
62
|
+
next if v.size > MAX_LENGTH
|
61
63
|
next if matcher.match(v).nil?
|
62
64
|
infos = {
|
63
65
|
'id' => id,
|
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.10.
|
4
|
+
version: 1.10.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sqreen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: execjs
|