rollbar 3.1.1 → 3.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +18 -1
- data/Gemfile +12 -6
- data/gemfiles/rails50.gemfile +2 -2
- data/gemfiles/rails51.gemfile +2 -2
- data/gemfiles/rails52.gemfile +1 -1
- data/gemfiles/rails60.gemfile +3 -8
- data/gemfiles/rails61.gemfile +53 -0
- data/lib/rollbar/item/locals.rb +0 -1
- data/lib/rollbar/middleware/js.rb +1 -6
- data/lib/rollbar/plugins/thread.rb +8 -7
- data/lib/rollbar/scrubbers/url.rb +15 -1
- data/lib/rollbar/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34869f5fb3dc29aafe043984527ff94e183c7d8ddec4ea902560687ada4577aa
|
4
|
+
data.tar.gz: '08895a2da93303ae28fa0675c13667fc7de9f6926464d6ac360939b9c2655409'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ab65c5cc3f2e0b9ff4355d2cfe58753d9d1cc92a002aa3def7a9ed48ff3d03e3cfe7137b05e0793f1cf1c8cb5a8695a658a5622e1e4b7ad540368fca07a59c6
|
7
|
+
data.tar.gz: 52f63b3739d2ac883253ff1dc04e1513665febbd900525e02584908f35dd15e8152e2db51a43c64e91dfde3400d6efe025756600d71c72c587475024a4d14250
|
data/.github/workflows/ci.yml
CHANGED
@@ -11,16 +11,23 @@ jobs:
|
|
11
11
|
runs-on: ubuntu-18.04
|
12
12
|
strategy:
|
13
13
|
matrix:
|
14
|
-
ruby-version: [2.2.10, 2.3.0, 2.3.8, 2.4.5, 2.5.3, 2.6.0]
|
14
|
+
ruby-version: [2.2.10, 2.3.0, 2.3.8, 2.4.5, 2.5.3, 2.6.0, 2.6.6, 2.7.2]
|
15
15
|
gemfile:
|
16
16
|
- gemfiles/rails42.gemfile
|
17
17
|
- gemfiles/rails50.gemfile
|
18
18
|
- gemfiles/rails51.gemfile
|
19
19
|
- gemfiles/rails52.gemfile
|
20
20
|
- gemfiles/rails60.gemfile
|
21
|
+
- gemfiles/rails61.gemfile
|
21
22
|
exclude:
|
23
|
+
- gemfile: gemfiles/rails42.gemfile
|
24
|
+
ruby-version: 2.7.2
|
22
25
|
- gemfile: gemfiles/rails42.gemfile
|
23
26
|
ruby-version: 2.6.0
|
27
|
+
- gemfile: gemfiles/rails42.gemfile
|
28
|
+
ruby-version: 2.6.6
|
29
|
+
- gemfile: gemfiles/rails42.gemfile
|
30
|
+
ruby-version: 2.7.2
|
24
31
|
- gemfile: gemfiles/rails52.gemfile
|
25
32
|
ruby-version: 2.2.10
|
26
33
|
- gemfile: gemfiles/rails60.gemfile
|
@@ -31,6 +38,14 @@ jobs:
|
|
31
38
|
ruby-version: 2.3.8
|
32
39
|
- gemfile: gemfiles/rails60.gemfile
|
33
40
|
ruby-version: 2.4.5
|
41
|
+
- gemfile: gemfiles/rails61.gemfile
|
42
|
+
ruby-version: 2.2.10
|
43
|
+
- gemfile: gemfiles/rails61.gemfile
|
44
|
+
ruby-version: 2.3.0
|
45
|
+
- gemfile: gemfiles/rails61.gemfile
|
46
|
+
ruby-version: 2.3.8
|
47
|
+
- gemfile: gemfiles/rails61.gemfile
|
48
|
+
ruby-version: 2.4.5
|
34
49
|
include:
|
35
50
|
- gemfile: gemfiles/rails41.gemfile
|
36
51
|
ruby-version: 2.3.0
|
@@ -52,6 +67,8 @@ jobs:
|
|
52
67
|
ruby-version: 2.0.0
|
53
68
|
- gemfile: gemfiles/rails30.gemfile
|
54
69
|
ruby-version: 2.0.0
|
70
|
+
- gemfile: gemfiles/rails61.gemfile
|
71
|
+
ruby-version: 3.0.0
|
55
72
|
|
56
73
|
steps:
|
57
74
|
- uses: actions/checkout@v2
|
data/Gemfile
CHANGED
@@ -11,8 +11,7 @@ ENV['CURRENT_GEMFILE'] ||= __FILE__
|
|
11
11
|
|
12
12
|
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby')
|
13
13
|
|
14
|
-
GEMFILE_RAILS_VERSION = '
|
15
|
-
|
14
|
+
GEMFILE_RAILS_VERSION = '6.1.1'.freeze
|
16
15
|
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
|
17
16
|
gem 'appraisal'
|
18
17
|
gem 'jruby-openssl', :platform => :jruby
|
@@ -21,8 +20,7 @@ gem 'rake'
|
|
21
20
|
if GEMFILE_RAILS_VERSION < '6.0'
|
22
21
|
gem 'rspec-rails', '~> 3.4'
|
23
22
|
else
|
24
|
-
|
25
|
-
gem 'rspec-rails', :git => 'https://github.com/rspec/rspec-rails', :ref => 'v4.0.0.beta2' # rubocop:disable Bundler/DuplicatedGem
|
23
|
+
gem 'rspec-rails', '~> 4.0.2' # rubocop:disable Bundler/DuplicatedGem
|
26
24
|
end
|
27
25
|
|
28
26
|
if GEMFILE_RAILS_VERSION < '6.0'
|
@@ -41,7 +39,7 @@ platforms :rbx do
|
|
41
39
|
gem 'minitest'
|
42
40
|
gem 'racc'
|
43
41
|
gem 'rubinius-developer_tools'
|
44
|
-
gem 'rubysl', '~> 2.0'
|
42
|
+
gem 'rubysl', '~> 2.0' if RUBY_VERSION.start_with?('2') # rubysl doesn't yet support Ruby 3.x
|
45
43
|
end
|
46
44
|
|
47
45
|
gem 'capistrano', :require => false
|
@@ -56,7 +54,15 @@ unless is_jruby
|
|
56
54
|
end
|
57
55
|
|
58
56
|
gem 'aws-sdk-sqs'
|
59
|
-
|
57
|
+
|
58
|
+
if GEMFILE_RAILS_VERSION >= '5.2'
|
59
|
+
gem 'database_cleaner'
|
60
|
+
elsif GEMFILE_RAILS_VERSION.between?('5.0', '5.2')
|
61
|
+
gem 'database_cleaner', '~> 1.8.4' # rubocop:disable Bundler/DuplicatedGem
|
62
|
+
elsif GEMFILE_RAILS_VERSION < '5.0'
|
63
|
+
gem 'database_cleaner', '~> 1.0.0' # rubocop:disable Bundler/DuplicatedGem
|
64
|
+
end
|
65
|
+
|
60
66
|
if GEMFILE_RAILS_VERSION < '6.0'
|
61
67
|
gem 'delayed_job', :require => false
|
62
68
|
else
|
data/gemfiles/rails50.gemfile
CHANGED
@@ -25,7 +25,7 @@ platforms :rbx do
|
|
25
25
|
gem 'minitest'
|
26
26
|
gem 'racc'
|
27
27
|
gem 'rubinius-developer_tools'
|
28
|
-
gem 'rubysl', '~> 2.0'
|
28
|
+
gem 'rubysl', '~> 2.0' if RUBY_VERSION.start_with?('2') # rubysl doesn't yet support Ruby 3.x
|
29
29
|
end
|
30
30
|
|
31
31
|
gem 'capistrano', :require => false
|
@@ -39,7 +39,7 @@ end
|
|
39
39
|
|
40
40
|
# We need last sinatra that uses rack 2.1.x
|
41
41
|
gem 'sinatra', :git => 'https://github.com/sinatra/sinatra', :tag => 'v2.0.8'
|
42
|
-
gem 'database_cleaner'
|
42
|
+
gem 'database_cleaner', '~> 1.8.4'
|
43
43
|
gem 'delayed_job', :require => false
|
44
44
|
gem 'generator_spec'
|
45
45
|
gem 'girl_friday', '>= 0.11.1'
|
data/gemfiles/rails51.gemfile
CHANGED
@@ -25,7 +25,7 @@ platforms :rbx do
|
|
25
25
|
gem 'minitest'
|
26
26
|
gem 'racc'
|
27
27
|
gem 'rubinius-developer_tools'
|
28
|
-
gem 'rubysl', '~> 2.0'
|
28
|
+
gem 'rubysl', '~> 2.0' if RUBY_VERSION.start_with?('2') # rubysl doesn't yet support Ruby 3.x
|
29
29
|
end
|
30
30
|
|
31
31
|
gem 'capistrano', :require => false
|
@@ -40,7 +40,7 @@ end
|
|
40
40
|
# We need last sinatra that uses rack 2.1.x
|
41
41
|
gem 'sinatra', :git => 'https://github.com/sinatra/sinatra', :tag => 'v2.0.8'
|
42
42
|
|
43
|
-
gem 'database_cleaner'
|
43
|
+
gem 'database_cleaner', '~> 1.8.4'
|
44
44
|
gem 'delayed_job', :require => false
|
45
45
|
gem 'generator_spec'
|
46
46
|
gem 'girl_friday', '>= 0.11.1'
|
data/gemfiles/rails52.gemfile
CHANGED
@@ -23,7 +23,7 @@ platforms :rbx do
|
|
23
23
|
gem 'minitest'
|
24
24
|
gem 'racc'
|
25
25
|
gem 'rubinius-developer_tools'
|
26
|
-
gem 'rubysl', '~> 2.0'
|
26
|
+
gem 'rubysl', '~> 2.0' if RUBY_VERSION.start_with?('2') # rubysl doesn't yet support Ruby 3.x
|
27
27
|
end
|
28
28
|
|
29
29
|
gem 'sucker_punch', '~> 2.0'
|
data/gemfiles/rails60.gemfile
CHANGED
@@ -10,12 +10,7 @@ gem 'jruby-openssl', :platform => :jruby
|
|
10
10
|
gem 'rails', '6.0.2.1'
|
11
11
|
gem 'sqlite3', '~> 1.4', :platform => [:ruby, :mswin, :mingw]
|
12
12
|
|
13
|
-
gem 'rspec-
|
14
|
-
gem 'rspec-support', '~> 3.8.0'
|
15
|
-
gem 'rspec-expectations', '~> 3.8.0'
|
16
|
-
gem 'rspec-mocks', '~> 3.8.0'
|
17
|
-
# TODO: update this when 4.x becomes available on Rubygems
|
18
|
-
gem 'rspec-rails', :git => 'https://github.com/rspec/rspec-rails', :ref => 'v4.0.0.beta2' # rubocop:disable Bundler/DuplicatedGem
|
13
|
+
gem 'rspec-rails', '~> 4.0.2'
|
19
14
|
|
20
15
|
gem 'rake'
|
21
16
|
|
@@ -25,7 +20,7 @@ platforms :rbx do
|
|
25
20
|
gem 'minitest'
|
26
21
|
gem 'racc'
|
27
22
|
gem 'rubinius-developer_tools'
|
28
|
-
gem 'rubysl', '~> 2.0'
|
23
|
+
gem 'rubysl', '~> 2.0' if RUBY_VERSION.start_with?('2') # rubysl doesn't yet support Ruby 3.x
|
29
24
|
end
|
30
25
|
|
31
26
|
gem 'sucker_punch', '~> 2.0'
|
@@ -35,7 +30,7 @@ gem 'sinatra', :git => 'https://github.com/sinatra/sinatra'
|
|
35
30
|
|
36
31
|
gem 'database_cleaner'
|
37
32
|
gem 'codacy-coverage'
|
38
|
-
gem 'delayed_job', '4.1.
|
33
|
+
gem 'delayed_job', '4.1.9', :require => false
|
39
34
|
gem 'generator_spec'
|
40
35
|
gem 'girl_friday', '>= 0.11.1'
|
41
36
|
gem 'redis'
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'rubygems/version'
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
6
|
+
|
7
|
+
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
|
8
|
+
gem 'jruby-openssl', :platform => :jruby
|
9
|
+
gem 'rails', '6.1.1'
|
10
|
+
gem 'sqlite3', '~> 1.4', :platform => [:ruby, :mswin, :mingw]
|
11
|
+
|
12
|
+
gem 'rspec-rails', '~> 4.0.2'
|
13
|
+
|
14
|
+
gem 'rake'
|
15
|
+
|
16
|
+
gem 'sidekiq', '>= 2.13.0'
|
17
|
+
|
18
|
+
platforms :rbx do
|
19
|
+
gem 'minitest'
|
20
|
+
gem 'racc'
|
21
|
+
gem 'rubinius-developer_tools'
|
22
|
+
gem 'rubysl', '~> 2.0' if RUBY_VERSION.start_with?('2') # rubysl doesn't yet support Ruby 3.x
|
23
|
+
end
|
24
|
+
|
25
|
+
gem 'sucker_punch', '~> 2.0'
|
26
|
+
|
27
|
+
# We need last sinatra that uses rack 2.x
|
28
|
+
gem 'sinatra', :git => 'https://github.com/sinatra/sinatra'
|
29
|
+
|
30
|
+
gem 'database_cleaner'
|
31
|
+
gem 'codacy-coverage'
|
32
|
+
gem 'delayed_job', '4.1.9', :require => false
|
33
|
+
gem 'generator_spec'
|
34
|
+
gem 'girl_friday', '>= 0.11.1'
|
35
|
+
gem 'redis'
|
36
|
+
gem 'resque'
|
37
|
+
gem 'simplecov'
|
38
|
+
|
39
|
+
unless is_jruby
|
40
|
+
# JRuby doesn't support fork, which is required for this test helper.
|
41
|
+
gem 'rspec-command'
|
42
|
+
end
|
43
|
+
|
44
|
+
gem 'mime-types'
|
45
|
+
|
46
|
+
gem 'webmock', :require => false
|
47
|
+
|
48
|
+
gem 'aws-sdk-sqs'
|
49
|
+
gem 'shoryuken'
|
50
|
+
|
51
|
+
gem 'capistrano', :require => false
|
52
|
+
|
53
|
+
gemspec :path => '../'
|
data/lib/rollbar/item/locals.rb
CHANGED
@@ -183,7 +183,6 @@ module Rollbar
|
|
183
183
|
req.respond_to?(:content_security_policy) &&
|
184
184
|
req.content_security_policy &&
|
185
185
|
req.content_security_policy.directives['script-src'] &&
|
186
|
-
!req.content_security_policy.directives['script-src'].include?("'unsafe-inline'") &&
|
187
186
|
req.content_security_policy_nonce
|
188
187
|
end
|
189
188
|
|
@@ -224,16 +223,12 @@ module Rollbar
|
|
224
223
|
end
|
225
224
|
|
226
225
|
def csp_needs_nonce?(csp)
|
227
|
-
!opt_out?(csp)
|
226
|
+
!opt_out?(csp)
|
228
227
|
end
|
229
228
|
|
230
229
|
def opt_out?(_csp)
|
231
230
|
raise NotImplementedError
|
232
231
|
end
|
233
|
-
|
234
|
-
def unsafe_inline?(csp)
|
235
|
-
csp[:script_src].to_a.include?("'unsafe-inline'")
|
236
|
-
end
|
237
232
|
end
|
238
233
|
|
239
234
|
class SecureHeadersFalse < SecureHeadersResolver
|
@@ -1,13 +1,14 @@
|
|
1
1
|
Rollbar.plugins.define('thread') do
|
2
|
-
|
3
|
-
|
4
|
-
def
|
2
|
+
module Rollbar
|
3
|
+
module ThreadPlugin
|
4
|
+
def initialize(*args)
|
5
5
|
self[:_rollbar_notifier] ||= Rollbar.notifier.scope
|
6
|
-
|
6
|
+
super
|
7
7
|
end
|
8
|
-
|
9
|
-
alias_method :initialize_without_rollbar, :initialize
|
10
|
-
alias_method :initialize, :initialize_with_rollbar
|
11
8
|
end
|
12
9
|
end
|
10
|
+
|
11
|
+
execute do
|
12
|
+
Thread.send(:prepend, Rollbar::ThreadPlugin) # rubocop:disable Lint/SendWithMixinArgument
|
13
|
+
end
|
13
14
|
end
|
@@ -13,7 +13,7 @@ module Rollbar
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def call(options = {})
|
16
|
-
url = options[:url]
|
16
|
+
url = ascii_encode(options[:url])
|
17
17
|
|
18
18
|
filter(url,
|
19
19
|
build_regex(options[:scrub_fields]),
|
@@ -29,6 +29,20 @@ module Rollbar
|
|
29
29
|
|
30
30
|
private
|
31
31
|
|
32
|
+
def ascii_encode(url)
|
33
|
+
# In some cases non-ascii characters won't be properly encoded, so we do it here.
|
34
|
+
#
|
35
|
+
# The standard encoders (the CGI and URI methods) are not reliable when the query string
|
36
|
+
# is already embedded in the full URL, but the inconsistencies are limited to issues
|
37
|
+
# with characters in the ascii range. (For example, the '#' if it appears in an unexpected place.)
|
38
|
+
# For escaping non-ascii, they are all OK, so we'll take care to skip the ascii chars.
|
39
|
+
|
40
|
+
return url if url.ascii_only?
|
41
|
+
|
42
|
+
# Iterate each char and only escape non-ascii characters.
|
43
|
+
url.each_char.map { |c| c.ascii_only? ? c : CGI.escape(c) }.join
|
44
|
+
end
|
45
|
+
|
32
46
|
def build_whitelist_regex(whitelist)
|
33
47
|
fields = whitelist.find_all { |f| f.is_a?(String) || f.is_a?(Symbol) }
|
34
48
|
return unless fields.any?
|
data/lib/rollbar/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rollbar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rollbar, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Easy and powerful exception tracking for Ruby
|
14
14
|
email:
|
@@ -47,6 +47,7 @@ files:
|
|
47
47
|
- gemfiles/rails51.gemfile
|
48
48
|
- gemfiles/rails52.gemfile
|
49
49
|
- gemfiles/rails60.gemfile
|
50
|
+
- gemfiles/rails61.gemfile
|
50
51
|
- lib/generators/rollbar/rollbar_generator.rb
|
51
52
|
- lib/generators/rollbar/templates/initializer.rb
|
52
53
|
- lib/rails/rollbar_runner.rb
|
@@ -160,8 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
161
|
- !ruby/object:Gem::Version
|
161
162
|
version: '0'
|
162
163
|
requirements: []
|
163
|
-
|
164
|
-
rubygems_version: 2.7.7
|
164
|
+
rubygems_version: 3.2.3
|
165
165
|
signing_key:
|
166
166
|
specification_version: 4
|
167
167
|
summary: Reports exceptions to Rollbar
|