pact 1.55.4 → 1.55.5

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: 5df3588ab530c1daf855cfe6277e5753d8ca788066951f3e08ef181af615b1d7
4
- data.tar.gz: f13b6198bd1e1383a4dd978ca77bcdc65ee1a60498be14e17bb19ce1622274f5
3
+ metadata.gz: b10e91c9004cfc9ac062f5a7f8af29366d1cfa38e7f763f649a78bb098355b5f
4
+ data.tar.gz: 272b6a356bdeabc2250a4190ee33c37dd38f814b07a4db3d041cdba18ab4e387
5
5
  SHA512:
6
- metadata.gz: 476546bb221362d55c77df417d04a9f00a69bedc042ab6aabc059d498dc094f24f810ec25ea3f167ad77e366c4d8fd8d95b473d2d8d74ca5a58027d9d03e0e00
7
- data.tar.gz: 500c176acb2a0f3e4b611b373afc0a868af0ba3bfa8d2082c4e192ffe00b80a4a63a11cadd408d19c28105091b73961c09ce2193d47705a3355b870fa9f777bf
6
+ metadata.gz: fbaae4a4c078612e0441f8143f60cdbed8708da63eaaeff20e5f6677f10e499ff21a24b814459b0da60f534df6c3b95ce34827e3d9cc183f7d1676ae9615d614
7
+ data.tar.gz: f862fdfee39090335099e2584a4431441b2c564a198fb4516622d71502730ca35fd315181a720d4b7b7838ba8ba03f93096815f923deca41c17e1ef9b66c199f
@@ -1,3 +1,11 @@
1
+ <a name="v1.55.5"></a>
2
+ ### v1.55.5 (2020-10-12)
3
+
4
+ #### Bug Fixes
5
+
6
+ * **security**
7
+ * hide personal access token given in uri (#225) ([f6db12d](/../../commit/f6db12d))
8
+
1
9
  <a name="v1.55.4"></a>
2
10
  ### v1.55.4 (2020-10-09)
3
11
 
@@ -17,7 +17,7 @@ module Pact
17
17
  end
18
18
 
19
19
  def basic_auth?
20
- !!username
20
+ !!username && !!password
21
21
  end
22
22
 
23
23
  def username
@@ -29,12 +29,23 @@ module Pact
29
29
  end
30
30
 
31
31
  def to_s
32
- if basic_auth? && uri.start_with?('http://', 'https://')
32
+ if basic_auth? && http_or_https_uri?
33
33
  URI(@uri).tap { |x| x.userinfo="#{username}:*****"}.to_s
34
+ elsif personal_access_token? && http_or_https_uri?
35
+ URI(@uri).tap { |x| x.userinfo="*****"}.to_s
34
36
  else
35
37
  uri
36
38
  end
37
39
  end
40
+
41
+ private def personal_access_token?
42
+ !!username && !password
43
+ end
44
+
45
+ private def http_or_https_uri?
46
+ uri.start_with?('http://', 'https://')
47
+ end
48
+
38
49
  end
39
50
  end
40
51
  end
@@ -1,4 +1,4 @@
1
1
  # Remember to bump pact-provider-proxy when this changes major version
2
2
  module Pact
3
- VERSION = "1.55.4"
3
+ VERSION = "1.55.5"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pact
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.55.4
4
+ version: 1.55.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Fraser
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2020-10-09 00:00:00.000000000 Z
15
+ date: 2020-10-11 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rspec