google-ads-common 0.14.0 → 0.14.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3267da5cdfdc5eef0f5653e99c6bd8329addb03f
4
- data.tar.gz: 06334b9e716c913d333d49089f30fd2fc2158823
3
+ metadata.gz: 991111457e7120b976a506c037b0fd935aa5c6f9
4
+ data.tar.gz: 0a769071c1c36367d1b5f484290584f43401bf72
5
5
  SHA512:
6
- metadata.gz: c1a6a5e280a2897d4443224111473de8f75a7db7550c9372364038418321c475473b50149e4d4f829e7be5f8b32445ed719fbdf39db8fa2b73df8ee57f4a9758
7
- data.tar.gz: 9b1612f9cc4b39666296a48be14960801773d401763dceaaee115193b21531bb6462d3a788c43dad93b724cd4c4ca0c57929e3dc0154583309fc10d3a3b1c93a
6
+ metadata.gz: 95974d42f490a7b4395089032f09afd8e570289831120fd51a95cad0fec249150e0a89a26cf4dbfe5286cd886c622ab9ba6f4ff695a74c403ee61e3cfda8a19f
7
+ data.tar.gz: 3bcc749b38ab140d2b994bdd2ae01bbf13a34947574412f49498b64f5c83d488bd355503bc399c5b76e49106d048e218099d0132e49a64afc8baa32973062a2b
data/ChangeLog CHANGED
@@ -1,3 +1,6 @@
1
+ 0.14.1:
2
+ - Scrubbing an additional sensitive field present in some AdWords requests.
3
+
1
4
  0.14.0:
2
5
  - Standardizing logging format for requests, response, and summary.
3
6
 
@@ -220,8 +220,11 @@ module AdsCommon
220
220
 
221
221
  # Sanitize the request body, redacting sensitive information.
222
222
  def sanitize_request(body)
223
- body.gsub(/developerToken>[a-zA-Z0-9_\-]+<\//,
223
+ body = body.gsub(/developerToken>[^<]+<\//,
224
224
  'developerToken>REDACTED</')
225
+ body = body.gsub(/httpAuthorizationHeader>[^<]+<\//,
226
+ 'httpAuthorizationHeader>REDACTED</')
227
+ return body
225
228
  end
226
229
 
227
230
  # Format the fault message by capping length and removing newlines.
@@ -19,6 +19,6 @@
19
19
 
20
20
  module AdsCommon
21
21
  module ApiConfig
22
- CLIENT_LIB_VERSION = '0.14.0'
22
+ CLIENT_LIB_VERSION = '0.14.1'
23
23
  end
24
24
  end
@@ -90,9 +90,14 @@ class TestSavonService < Test::Unit::TestCase
90
90
  test2 = "<xml><element1></element1><element2></element2></xml>"
91
91
  test3 = "<xml><ns1:developerToken>w-x_Y-Z_</ns1:developerToken></xml>"
92
92
  expected3 = "<xml><ns1:developerToken>REDACTED</ns1:developerToken></xml>"
93
+ test4 = "<xml><httpAuthorizationHeader>Authorization: Bearer " +
94
+ "1/abcdEFGH1234</httpAuthorizationHeader></xml>"
95
+ expected4 = "<xml><httpAuthorizationHeader>REDACTED" +
96
+ "</httpAuthorizationHeader></xml>"
93
97
  assert_equal(expected1, @stub_service.sanitize_request(test1))
94
98
  assert_equal(test2, @stub_service.sanitize_request(test2))
95
99
  assert_equal(expected3, @stub_service.sanitize_request(test3))
100
+ assert_equal(expected4, @stub_service.sanitize_request(test4))
96
101
  end
97
102
 
98
103
  def test_format_fault()
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-ads-common
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergio Gomes
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-05-24 00:00:00.000000000 Z
13
+ date: 2017-06-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: google-ads-savon