@riocrypto/common-server 1.0.2380 → 1.0.2381
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/build/services/logger.js +3 -3
- package/package.json +1 -1
package/build/services/logger.js
CHANGED
|
@@ -58,7 +58,7 @@ class LoggerService {
|
|
|
58
58
|
"routingNumber",
|
|
59
59
|
];
|
|
60
60
|
requestBodyFieldsToMaskWithLastFour.forEach((field) => {
|
|
61
|
-
if (
|
|
61
|
+
if (Object.prototype.hasOwnProperty.call(requestBody, field) &&
|
|
62
62
|
typeof requestBody[field] === "string") {
|
|
63
63
|
requestBody[field] = this.maskValue(requestBody[field], true);
|
|
64
64
|
}
|
|
@@ -71,7 +71,7 @@ class LoggerService {
|
|
|
71
71
|
"authenticatorCode",
|
|
72
72
|
];
|
|
73
73
|
requestBodyFieldsToMaskWithoutLastFour.forEach((field) => {
|
|
74
|
-
if (
|
|
74
|
+
if (Object.prototype.hasOwnProperty.call(requestBody, field) &&
|
|
75
75
|
typeof requestBody[field] === "string") {
|
|
76
76
|
requestBody[field] = this.maskValue(requestBody[field]);
|
|
77
77
|
}
|
|
@@ -85,7 +85,7 @@ class LoggerService {
|
|
|
85
85
|
const responseBody = resAsAny.body; // Keep this assertion for object access
|
|
86
86
|
const responseBodyFieldsToMask = ["secret", "value"];
|
|
87
87
|
responseBodyFieldsToMask.forEach((field) => {
|
|
88
|
-
if (
|
|
88
|
+
if (Object.prototype.hasOwnProperty.call(responseBody, field) &&
|
|
89
89
|
typeof responseBody[field] === "string") {
|
|
90
90
|
responseBody[field] = this.maskValue(responseBody[field]);
|
|
91
91
|
}
|