-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: not display privatekey #11006
chore: not display privatekey #11006
Conversation
Seems reasonable to me but could you switch to https://pkg.go.dev/golang.org/x/term? The library you're using is deprecated. |
Ah, wait. So, it looks like this code is designed for reading the key from stdin, not from a user typing it. |
Hm... although it still prompts.... Ok, I think the right answer is:
|
this is ok |
I just want to hide the private key display in the original logic, and the terminal's judgment already exists.I try my best to keep the original logic unchanged, so as to prevent some people's scripts from failing. |
931d3fc
to
5244d89
Compare
5244d89
to
a2431ff
Compare
3c81156
to
c7ef091
Compare
Are you sure this works when stdin is a pipe, not a terminal? That's why I suggested calling |
I see what you mean, thank you very much. |
c7ef091
to
f5680c7
Compare
forgive me for using force-push, I just want to make the commit cleaner |
f5680c7
to
2cf19d4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Related Issues
Let the user's private key no longer be displayed in the terminal to prevent malicious monitoring of the screen and stealing the private key.
Proposed Changes
Additional Info
Checklist
Before you mark the PR ready for review, please make sure that:
<PR type>: <area>: <change being made>
fix: mempool: Introduce a cache for valid signatures
PR type
: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, testarea
, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps