sqreen 1.18.3-java → 1.18.4-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/sqreen.rb +2 -0
- data/lib/sqreen/instrumentation.rb +8 -8
- data/lib/sqreen/rules/waf_cb.rb +2 -1
- data/lib/sqreen/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43b9ddb790f25ff47df2953ec789110bc2273fa02fe632b76c36066da880ad9a
|
4
|
+
data.tar.gz: 05544de42de06ad978ea9dfe330b330a090eff0ae8661bdfa8509251cf57d9ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3ba0e41808617dddbfc03d2f8807fa8039ad1ad40ac6a8b815082986ac8ef39aae795e1867faa685625c5a048f36a44beb4e29092528f7cb28aa087bd3a8034
|
7
|
+
data.tar.gz: b7f7b42ea91a2a9ece4e660485dac8aa65c4dfa635241f9e685b3ff855d21f68c091260814a9c7a14f3ecd9c6fe92f03824f084c718e8cb27691569537e5c011
|
data/CHANGELOG.md
CHANGED
data/lib/sqreen.rb
CHANGED
@@ -237,7 +237,7 @@ module Sqreen
|
|
237
237
|
key = [method]
|
238
238
|
args.each { |e| key.push(e.object_id) }
|
239
239
|
if key && @sqreen_multi_instr && @sqreen_multi_instr[instance.object_id].member?(key)
|
240
|
-
return instance.
|
240
|
+
return instance.__send__(original_method, *args, &block)
|
241
241
|
end
|
242
242
|
@sqreen_multi_instr ||= Hash.new { |h, k| h[k] = Set.new } # TODO: this should probably be a thread local
|
243
243
|
@sqreen_multi_instr[instance.object_id].add(key)
|
@@ -273,7 +273,7 @@ module Sqreen
|
|
273
273
|
skip_call = true
|
274
274
|
end
|
275
275
|
# If we are already overbudget let's not work at all
|
276
|
-
return
|
276
|
+
return __send__(original_meth, *args, &block) if skip_call
|
277
277
|
Instrumentation.guard_multi_call(self, meth, original_meth, args, block) do
|
278
278
|
precbs, postcbs, failcbs = Instrumentation.callbacks.get(klass_name, meth)
|
279
279
|
Thread.current[:sqreen_in_use] = true
|
@@ -328,7 +328,7 @@ module Sqreen
|
|
328
328
|
Thread.current[:sqreen_in_use] = false
|
329
329
|
return result if skip
|
330
330
|
begin
|
331
|
-
result =
|
331
|
+
result = __send__(original_meth, *args, &block)
|
332
332
|
rescue StandardError => e
|
333
333
|
Thread.current[:sqreen_in_use] = true
|
334
334
|
budget = Sqreen.performance_budget && framework && framework.remaining_perf_budget
|
@@ -401,7 +401,7 @@ module Sqreen
|
|
401
401
|
Sqreen::PerformanceNotifications::BinnedMetrics.start_request if has_notifications
|
402
402
|
|
403
403
|
begin
|
404
|
-
|
404
|
+
__send__(original_meth, *args, &block)
|
405
405
|
ensure
|
406
406
|
if has_notifications
|
407
407
|
Sqreen::PerformanceNotifications.instrument('next_req_notifs', PRE_CB) do
|
@@ -437,7 +437,7 @@ module Sqreen
|
|
437
437
|
end
|
438
438
|
|
439
439
|
alias_method original, new_method
|
440
|
-
|
440
|
+
__send__(method_kind, original)
|
441
441
|
private saved_meth_name
|
442
442
|
end
|
443
443
|
end
|
@@ -456,7 +456,7 @@ module Sqreen
|
|
456
456
|
method_kind = :private
|
457
457
|
end
|
458
458
|
alias_method meth, saved_meth_name
|
459
|
-
|
459
|
+
__send__(method_kind, meth)
|
460
460
|
|
461
461
|
remove_method saved_meth_name
|
462
462
|
end
|
@@ -503,7 +503,7 @@ module Sqreen
|
|
503
503
|
alias_method meth, new_method
|
504
504
|
private saved_meth_name
|
505
505
|
private new_method
|
506
|
-
|
506
|
+
__send__(method_kind, meth)
|
507
507
|
end
|
508
508
|
saved_meth_name
|
509
509
|
end
|
@@ -522,7 +522,7 @@ module Sqreen
|
|
522
522
|
method_kind = :private
|
523
523
|
end
|
524
524
|
alias_method meth.to_sym, saved_meth_name.to_sym
|
525
|
-
|
525
|
+
__send__(method_kind, meth.to_sym)
|
526
526
|
end
|
527
527
|
end
|
528
528
|
|
data/lib/sqreen/rules/waf_cb.rb
CHANGED
@@ -57,7 +57,7 @@ module Sqreen
|
|
57
57
|
ObjectSpace.define_finalizer(self, WAFCB.finalizer(@waf_rule_name.dup))
|
58
58
|
end
|
59
59
|
|
60
|
-
def pre(instance, args,
|
60
|
+
def pre(instance, args, budget)
|
61
61
|
return unless WAFCB.libsqreen? && WAFCB.waf?
|
62
62
|
|
63
63
|
request = framework.request
|
@@ -70,6 +70,7 @@ module Sqreen
|
|
70
70
|
h[e] = capper.call(b.resolve(*env))
|
71
71
|
end
|
72
72
|
waf_args = Sqreen::EncodingSanitizer.sanitize(waf_args)
|
73
|
+
budget = [self.budget, budget].compact.min
|
73
74
|
action, data = ::LibSqreen::WAF.run(waf_rule_name, waf_args, budget)
|
74
75
|
|
75
76
|
case action
|
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.18.
|
4
|
+
version: 1.18.4
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Sqreen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|