blouson 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +7 -0
- data/Appraisals +4 -0
- data/gemfiles/rails_6.0.gemfile +7 -0
- data/lib/blouson/raven_parameter_filter_processor.rb +7 -1
- data/lib/blouson/sensitive_query_filter.rb +9 -3
- data/lib/blouson/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78a44cf04cd15a16cdfb9eb997fbce7d96afb7c5e78c2a27a0bfa41064eccdcd
|
4
|
+
data.tar.gz: 5647cc9aac63b8e4b94690949b3b171cb814b4319f2f673bf959bd03a265cafd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c5f39468c0f5de0f9b542d6ff239ddf41bdd6672ec969ec852ca2ff9d6ac67dfe7aa34955737a13ac6b60459d675f707032386941f651abe5e4f3f5d0a175f7
|
7
|
+
data.tar.gz: 740cfacbb6268c9466372e6c6775d7eae6f6b28528f2f255c8b07b57df570b9f38f6c7e45092c9f206b7c8073e9cdc3b296ae8dd479d24583602ca965cd19429
|
data/.travis.yml
CHANGED
@@ -7,11 +7,18 @@ gemfile:
|
|
7
7
|
- gemfiles/rails_5.0.gemfile
|
8
8
|
- gemfiles/rails_5.1.gemfile
|
9
9
|
- gemfiles/rails_5.2.gemfile
|
10
|
+
- gemfiles/rails_6.0.gemfile
|
10
11
|
rvm:
|
11
12
|
- 2.3.8
|
12
13
|
- 2.4.6
|
13
14
|
- 2.5.5
|
14
15
|
- 2.6.3
|
16
|
+
matrix:
|
17
|
+
exclude:
|
18
|
+
- rvm: 2.3.8
|
19
|
+
gemfile: gemfiles/rails_6.0.gemfile
|
20
|
+
- rvm: 2.4.6
|
21
|
+
gemfile: gemfiles/rails_6.0.gemfile
|
15
22
|
before_install:
|
16
23
|
- "[[ $BUNDLE_GEMFILE =~ rails_4\\.2 ]] && gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true"
|
17
24
|
- "[[ $BUNDLE_GEMFILE =~ rails_4\\.2 ]] && gem install bundler -v '< 2' || true"
|
data/Appraisals
CHANGED
@@ -14,7 +14,13 @@ module Blouson
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def initialize(client = nil)
|
17
|
-
|
17
|
+
# ActionDispatch::Http::ParameterFilter is deprecated and will be removed from Rails 6.1.
|
18
|
+
parameter_filter_klass = if defined?(ActiveSupport::ParameterFilter)
|
19
|
+
ActiveSupport::ParameterFilter
|
20
|
+
else
|
21
|
+
ActionDispatch::Http::ParameterFilter
|
22
|
+
end
|
23
|
+
@parameter_filter = parameter_filter_klass.new(self.class.filters)
|
18
24
|
end
|
19
25
|
|
20
26
|
def process(value)
|
@@ -15,9 +15,10 @@ module Blouson
|
|
15
15
|
end
|
16
16
|
|
17
17
|
module StatementInvalidErrorFilter
|
18
|
-
def initialize(message = nil, original_exception = nil)
|
19
|
-
if SensitiveQueryFilter.contain_sensitive_query?(message)
|
20
|
-
message = SensitiveQueryFilter.filter_sensitive_words(message)
|
18
|
+
def initialize(message = nil, original_exception = nil, sql: nil, binds: nil)
|
19
|
+
if SensitiveQueryFilter.contain_sensitive_query?(message) || (SensitiveQueryFilter.contain_sensitive_query?(sql))
|
20
|
+
message = SensitiveQueryFilter.filter_sensitive_words(message) if message
|
21
|
+
sql = SensitiveQueryFilter.filter_sensitive_words(sql) if sql
|
21
22
|
if defined?(Mysql2::Error)
|
22
23
|
if original_exception.is_a?(Mysql2::Error)
|
23
24
|
original_exception.extend(Mysql2Filter)
|
@@ -30,6 +31,11 @@ module Blouson
|
|
30
31
|
if original_exception
|
31
32
|
# Rails < 5.0
|
32
33
|
super(message, original_exception)
|
34
|
+
elsif sql
|
35
|
+
# Rails >= 6.0
|
36
|
+
#
|
37
|
+
# - https://github.com/rails/rails/pull/34468
|
38
|
+
super(message, sql: sql, binds: binds)
|
33
39
|
else
|
34
40
|
# Rails >= 5.0
|
35
41
|
#
|
data/lib/blouson/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blouson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cookpad Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -159,6 +159,7 @@ files:
|
|
159
159
|
- gemfiles/rails_5.0.gemfile
|
160
160
|
- gemfiles/rails_5.1.gemfile
|
161
161
|
- gemfiles/rails_5.2.gemfile
|
162
|
+
- gemfiles/rails_6.0.gemfile
|
162
163
|
- lib/blouson.rb
|
163
164
|
- lib/blouson/engine.rb
|
164
165
|
- lib/blouson/raven_parameter_filter_processor.rb
|