Skip to content
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

Able to import duplicate IPNS keys (but not by name) #16670

Closed
stephendonner opened this issue Jun 29, 2021 · 3 comments
Closed

Able to import duplicate IPNS keys (but not by name) #16670

stephendonner opened this issue Jun 29, 2021 · 3 comments

Comments

@stephendonner
Copy link

Description

Able to import duplicate IPNS keys (but not by name)

Steps to Reproduce

  1. new profile
  2. launch Brave
  3. load ipns://brantly.eth
  4. click on Use a local node
  5. load brave://settings/ipfs/keys
  6. click Add
  7. type importedkey and click Import
  8. select the key file through the OS, click OK
  9. on brave://settings/ipfs/keys click Add again
  10. type importedkey2 and click Import
  11. select the same key file through the OS, click OK

Actual result:

Currently, we allow for duplicate-hash/data key files to be imported using a different name.

ipfs-keys-list

Expected result:

Shouldn't allow duplicate keys, by key hash/data

Reproduces how often:

100%

Brave version (brave://version info)

Brave 1.26.67 Chromium: 91.0.4472.114 (Official Build) (64-bit)
Revision 4bb19460e8d88c3446b360b0df8fd991fee49c0b-refs/branch-heads/4472@{#1496}
OS Windows 10 OS Version 2009 (Build 21390.2025)
@lidel
Copy link

lidel commented Jul 1, 2021

Having the same key under different names is allowed by ipfs key import, so technically it is not a bug. More like an UX concern.

Brave could add check that forces user to have only one key, but not sure if that improves UX enough to justify additional development/code. I don't feel strongly about this either way :)

@stephendonner
Copy link
Author

Same; mostly just wanted to get this logged for decision/paper-trail reasons :-)

@bbondy
Copy link
Member

bbondy commented Jul 2, 2021

I think it's ok to allow it, we'll close for now unless a good reason surfaces to disallow. Thanks for logging it in any case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants