Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Fix #77: don't show password in plaintext in console #82

Merged
merged 6 commits into from
Jan 2, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/api/src/transport/ws/ws.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ class Ws extends JsonRpcBase {

// Don't print error if request rejected or not is not yet up...
if (!/(rejected|not yet up)/.test(result.error.message)) {
var dangerous_methods = ['signer_confirmRequest', 'signer_confirmRequestWithToken'];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const

if (dangerous_methods.includes(method)) {
params.pop();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use pop(), since it alters params, which might be used somewhere else

}

console.error(`${method}(${JSON.stringify(params)}): ${result.error.code}: ${result.error.message}`);
}

Expand Down