-
Notifications
You must be signed in to change notification settings - Fork 9
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
Help to avoid sending over the mnemonic to nexus for search #656
Conversation
Deployed to Cloudflare Pages
|
fabec01
to
8c05974
Compare
8c05974
to
fcdd0a9
Compare
Wait, why don't you instead detect the mnemonic and send it to your personal computer? You're just leaving money on the table! |
That will come in a subsequent change, when the buzz around explorer has already faded... 😁 |
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.
I don't think most of this is worth the maintenance burden. I definitely don't want TFunction inside routes :/ and sending slightly invalid mnemonic isn't safe either
If we are OK with having to say "I command thee" in English, independently of i18n, then we can get rid of most of the extra complexity, including the one impacting the routes.
My guees would be that this typically happens using copy-paste. Copy-paste doesnt usually introduce slight errors... |
fcdd0a9
to
4805c18
Compare
4805c18
to
5f114ad
Compare
@lukaw3d how about the new, simplified implementation? (With no TFunction creep) |
Wait, I have another idea... |
OK, rephreasing in idiocracy lingo. |
src/locales/en/translation.json
Outdated
@@ -364,6 +364,10 @@ | |||
}, | |||
"search": { | |||
"placeholder": "Address, Block, Contract, Txn Hash, Transaction ID, Token name, etc", | |||
"error": { | |||
"tooShort": "Please enter at least 3 characters for searching", | |||
"privacy": "This thing that you are trying to search for looks an awful lot like a mnemonic for an Oasis wallet. Please note that this is super-secret data that should never ever be shared with anyone; not even with such excellent services as our {{ appName }}. That being said, we are not here to tell you what you can or can not do with your own data, so if you insist, we WILL search for it. So, if you really think that there is a token with a name that contains this, then in order to signify that you understand and accept the terrible risk of sending this data to our servers, please insert this to the beginning of your search: '{{ wordsOfPower }}'! (Without quotation marks, of course.) If you do so, we will comply with your command." |
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.
I don't think the message matters much; this is fine. Bit awkward for future translators
e0867d7
to
e974b6b
Compare
I would suggest this for the 'too little characters' notification: https://www.figma.com/file/ifCrok8cP5ymEYjMa2PIi9/Block-Explorer?type=design&node-id=6624%3A246974&mode=design&t=Gk19GONKNbhNZF6X-1 |
c6687d2
to
48e4368
Compare
Did that now: Also, when using the Words of Power: |
Continuing the discussion about the "too short" case in #671 |
48e4368
to
0597d1b
Compare
b5c8f34
to
127bced
Compare
Implemented like this: |
127bced
to
5cce1b9
Compare
@lukaw3d this has now been updated after merging the "too short" warning message separately. |
5cce1b9
to
8131714
Compare
@csillag This could work, but I feel we should stay closer to the new design. I’ve updated it a little here: https://www.figma.com/file/ifCrok8cP5ymEYjMa2PIi9/Block-Explorer?type=design&node-id=6673%3A248818&mode=design&t=NgiFzpta47LLPkRx-1 Also, the icon used is incorrect. |
See follow up in #689 |
Up to now, we could only search for strings in a few very strictly specified format. (Ie. block number, tx hash, etc.) But now that we can do free full-text search for token names, it has become a bit of a security vulnerability that it's possible to accidentally copy and send sensitive information, like your wallet private key mnemonics, if you are working with the wallet and the explorer at the same time, and accidentally copy the wrong string to the wrong field.
Although would probably not be an everyday event, it's worth to add a simple check to warn about this, before doing it.
If it happens, this is what we do: