lhc 15.2.0 → 15.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/lhc/scrubbers/headers_scrubber.rb +1 -0
- data/lib/lhc/version.rb +1 -1
- data/spec/request/scrubbed_headers_spec.rb +8 -0
- 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: 42aac9f48f10f07bbe4db078524e5b53ac03e8851184d5206a5898f79d2433ff
|
|
4
|
+
data.tar.gz: 5446bcfaa0ad5d3d46123326ebd14742b7fad56c32c1658073c3baec94fa41c8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 974f22ca22bce0aa13a6c0ee139f8bae16582b2186970259948fb0cf6770191771edc4279c064a93965eca0c54a229ee7bd74da95498dafb9127fd20641c1385
|
|
7
|
+
data.tar.gz: 806ccd323810f9bd83cd5b5ee087198d17e88d6b5e8cc04859fa42dd7670c5970273f06d7534052ea3e153f5709eaec8cee8349cc5b8dbc7299034b0bf1dd9d8
|
|
@@ -44,6 +44,7 @@ class LHC::HeadersScrubber < LHC::Scrubber
|
|
|
44
44
|
|
|
45
45
|
def scrub_bearer_authentication_headers?
|
|
46
46
|
auth_options[:bearer].present? &&
|
|
47
|
+
auth_options[:bearer_token] &&
|
|
47
48
|
scrubbed['Authorization'].present? &&
|
|
48
49
|
scrubbed['Authorization'].include?(auth_options[:bearer_token])
|
|
49
50
|
end
|
data/lib/lhc/version.rb
CHANGED
|
@@ -74,6 +74,14 @@ describe LHC::Request do
|
|
|
74
74
|
LHC.config.scrubs = {}
|
|
75
75
|
expect(request.scrubbed_headers).to include(authorization_header)
|
|
76
76
|
end
|
|
77
|
+
|
|
78
|
+
context 'when the bearer_token is nil' do
|
|
79
|
+
let(:bearer_token) { nil }
|
|
80
|
+
|
|
81
|
+
it 'scrubs nothing' do
|
|
82
|
+
expect(request.scrubbed_headers).to include(authorization_header)
|
|
83
|
+
end
|
|
84
|
+
end
|
|
77
85
|
end
|
|
78
86
|
|
|
79
87
|
context 'basic authentication' do
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lhc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 15.2.
|
|
4
|
+
version: 15.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- https://github.com/local-ch/lhc/contributors
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-11-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|