sqreen 1.13.1 → 1.13.2

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: bfd3871b5c2e61d4c87315cc7b31370a13e14100b91eb5543b46d3188d083bb6
4
- data.tar.gz: b7c1da38f915eb76f75b4c92ef90434265434103ce38809abc5a02be93559dda
3
+ metadata.gz: 9cc15db540d04e2f69f67dc7d0f8b94ef4ab5815177c9fd198690c2d5e1238c8
4
+ data.tar.gz: 6e525c6bc24a2663fcef4d18995cf773d1e82af006d00d5c6953151c4f374216
5
5
  SHA512:
6
- metadata.gz: 7023ac49c6f111c3f4c6c1396adc004649a369d16c0b5a847087fb3fd53e4a36a0fe13b5ee759a6a5a2a7f1e1e8dad9803d64338145441493f5a1435ddd18d0e
7
- data.tar.gz: b910493fbccee5c305f9f0db28c7e5e26e1602852350f178be0a89db57851b74518db0a262655b6085bef555405623f2584498e1f65a6daa4d2aa38cf72c6db7
6
+ metadata.gz: 5a12c3aec3897301e0b16d1505d1580ceb5fe24b0111b2047026fd83ce7a330bae2655b7eb333545cb6ed9c262593415e48146a5820c772efa2fe59189e5eee5
7
+ data.tar.gz: e04823e167597aa34782c8c5b29843f8d642b72d9d9e66a2d56bc3cd598d2bea432b4fa438fb05694316fb543f4ce8c2a1425baff6466eafcdab9248038231b2
@@ -502,6 +502,21 @@ module Sqreen
502
502
  false
503
503
  end
504
504
 
505
+ def sentry_ignore_exceptions
506
+ return unless defined?(Raven) && Raven.respond_to?(:configuration)
507
+ Raven.configuration.excluded_exceptions += ['Sqreen::AttackBlocked']
508
+ rescue
509
+ Sqreen.log.warn "Failed setting Sentry's excluded_exceptions: #{e.inspect}"
510
+ end
511
+
512
+ def newrelic_ignore_errors
513
+ return unless defined?(NewRelic::Agent::Agent)
514
+ NewRelic::Agent::Agent.instance.
515
+ error_collector.ignore(['Sqreen::AttackBlocked'])
516
+ rescue
517
+ Sqreen.log.warn "Failed ignoring AttackBlocked on NewRelic: #{e.inspect}"
518
+ end
519
+
505
520
  private
506
521
 
507
522
  def split_ip_addresses(ip_addresses)
@@ -89,6 +89,8 @@ module Sqreen
89
89
  def on_start(&block)
90
90
  @calling_pid = Process.pid
91
91
  Init.startup do |app|
92
+ sentry_ignore_exceptions
93
+ newrelic_ignore_errors
92
94
  hook_rack_request(app.class, &block)
93
95
  app.config.after_initialize do
94
96
  yield self
@@ -16,6 +16,8 @@ module Sqreen
16
16
  end
17
17
 
18
18
  def on_start(&block)
19
+ sentry_ignore_exceptions
20
+ newrelic_ignore_errors
19
21
  hook_app_build(Sinatra::Base)
20
22
  hook_rack_request(Sinatra::Application, &block)
21
23
  yield self
@@ -1,5 +1,5 @@
1
1
  # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
2
  # Please refer to our terms for more information: https://www.sqreen.io/terms.html
3
3
  module Sqreen
4
- VERSION = '1.13.1'.freeze
4
+ VERSION = '1.13.2'.freeze
5
5
  end
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.13.1
4
+ version: 1.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sqreen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-19 00:00:00.000000000 Z
11
+ date: 2018-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: execjs