hermes-rb 0.7.4 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/hermes/logger/params_filter.rb +12 -2
- data/lib/hermes/rb/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: c586c6b4d8703a646bf4be6b1145afd38a5921994a6fc2fc0d399bf0652af216
|
4
|
+
data.tar.gz: 343f3da81e31571f3c3d70459d1820964404662216e067a660d721cc2d030f7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edddadf124f234e4a5ca107f268d40c84df75c5cae9d09992d91dc9329152454d0bb838ceb5edd3c8697618b5477c6b8898fa0869a2dfa4e387e24d5be60ab08
|
7
|
+
data.tar.gz: 1547023b70a7c298c4247fba604bf2d4420a9335c9966dd3944049f667aa0815737925f60357190a9a511011d22c1b6690d63a8a000f5f4209fa812989d12527
|
data/Changelog.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -11,15 +11,25 @@ module Hermes
|
|
11
11
|
private :sensitive_keywords, :stripped_value
|
12
12
|
|
13
13
|
def initialize(sensitive_keywords: SENSITIVE_ATTRIBUTES_KEYWORDS, stripped_value: STRIPPED_VALUE)
|
14
|
-
@sensitive_keywords = sensitive_keywords
|
14
|
+
@sensitive_keywords = sensitive_keywords
|
15
15
|
@stripped_value = stripped_value
|
16
16
|
end
|
17
17
|
|
18
18
|
def call(attribute, value)
|
19
|
-
if sensitive_keywords.any? { |sensitive_attribute|
|
19
|
+
if sensitive_keywords.any? { |sensitive_attribute| match?(sensitive_attribute, attribute) } && value.respond_to?(:to_str)
|
20
20
|
value.gsub!(value, stripped_value)
|
21
21
|
end
|
22
22
|
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def match?(sensitive_attribute, attribute)
|
27
|
+
if Regexp === sensitive_attribute
|
28
|
+
attribute.to_s.match(sensitive_attribute)
|
29
|
+
else
|
30
|
+
attribute.to_s.downcase.match(sensitive_attribute.to_s.downcase)
|
31
|
+
end
|
32
|
+
end
|
23
33
|
end
|
24
34
|
end
|
25
35
|
end
|
data/lib/hermes/rb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hermes-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karol Galanciak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-struct
|