Skip to content

Commit

Permalink
fix the logger ignoring the sensitive complexed shapes (#3350)
Browse files Browse the repository at this point in the history
* fix the logger ignoring the sensitive complexed shapes
  • Loading branch information
AllanZhengYP authored Jul 16, 2020
1 parent a0f19ce commit 38e1df4
Show file tree
Hide file tree
Showing 3 changed files with 221 additions and 100 deletions.
5 changes: 5 additions & 0 deletions .changes/next-release/bugfix-Logger-e94be0b3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "bugfix",
"category": "Logger",
"description": "Fix the bug that SDK logs the sensitive data in structure, map, and list parameters"
}
9 changes: 4 additions & 5 deletions lib/event_listeners.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,9 @@ AWS.EventListeners = {
if (!shape) {
return shape;
}
if (inputShape.isSensitive) {
return '***SensitiveInformation***';
}
switch (inputShape.type) {
case 'structure':
var struct = {};
Expand All @@ -536,11 +539,7 @@ AWS.EventListeners = {
});
return map;
default:
if (inputShape.isSensitive) {
return '***SensitiveInformation***';
} else {
return shape;
}
return shape;
}
}

Expand Down
Loading

0 comments on commit 38e1df4

Please sign in to comment.