@vtex/api 6.45.9 → 6.45.10

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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [6.45.10] - 2022-03-15
11
+
12
+ ### Fixed
13
+
14
+ - Update sensitive fields.
15
+ - Add 'authorization', rawheaders', 'x-vtex-credential' and 'x-vtex-session'.
16
+ - Lowercase fields before comparison in cleanJson.
17
+
10
18
  ## [6.45.9] - 2022-03-08
11
19
 
12
20
  ### Fixed
package/lib/utils/json.js CHANGED
@@ -4,7 +4,7 @@ function cleanJson(json, targetFields) {
4
4
  for (const key of Object.keys(json)) {
5
5
  let deleted = false;
6
6
  for (const field of targetFields) {
7
- if (key === field) {
7
+ if (key.toLowerCase() === field) {
8
8
  delete json[key];
9
9
  deleted = true;
10
10
  }
package/lib/utils/log.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const json_1 = require("./json");
4
- const SENSITIVE_FIELDS = ['cookie', 'Cookie', 'vtexIdclientautcookie', 'error'];
4
+ const SENSITIVE_FIELDS = ['authorization', 'cookie', 'vtexidclientautcookie', 'rawheaders', 'x-vtex-credential', 'x-vtex-session', 'error'];
5
5
  exports.cleanLog = (log) => {
6
6
  return json_1.cleanJson(log, SENSITIVE_FIELDS);
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtex/api",
3
- "version": "6.45.9",
3
+ "version": "6.45.10",
4
4
  "description": "VTEX I/O API client",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",