sqreen-alt 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: 586eef352eb2908c42d21202d7664d437338b2076ec57dbfeda59e2232c2563e
4
- data.tar.gz: 7afd920592f2d237c22d5b6ac9c76ff03e0350e3b3fb7e6ccdc793753d4770be
3
+ metadata.gz: 390a6c7aa22959172222bef67bb4ffe94f9fe1f4af68c3b1030af93ead0f0cc9
4
+ data.tar.gz: 8563438c45ca98f93b23212dcefc282657be40b671b4cda5f61fdf05a917b3f6
5
5
  SHA512:
6
- metadata.gz: bab959ccf902e059286f810cbcefe39f9cd3cd4f418eff94ee873b07f1286fa9736c128635475f3b784987131045e3f61cbaed608653ea73db33d8f797e816aa
7
- data.tar.gz: f49fb952a41eec19217cf2581c94b603c065b749e97e01838fbfd2b94feb306982e9ffc3b1a3f3a16e8db8d8ba6a1c72aab60c564ff135e3c52ae229eeb1cf65
6
+ metadata.gz: 4bf966912dd3ed3138cbacc52c4f20ead4b789e72169a934a8b5c92206301881a4c1524e05fa37907894fae47c11dd530ad850d2688cd1ecbeb6b8cfea3898df
7
+ data.tar.gz: 1094f169ae8983d2119dbc3506961cfc9bb6beed401f270d16c54ceda02d32f95164b9ffbbd4e4fb7657882c27511ea37f20e8234d37942f592a184b4c94382b
@@ -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-alt
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