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

Skip password confirmation when starting polykey #140

Closed
tegefaulkes opened this issue Feb 26, 2024 · 1 comment
Closed

Skip password confirmation when starting polykey #140

tegefaulkes opened this issue Feb 26, 2024 · 1 comment
Assignees
Labels
bug Something isn't working r&d:polykey:supporting activity Supporting core activity

Comments

@tegefaulkes
Copy link
Contributor

Describe the bug

I've found it's possible to skip confirming the password when starting Polykey from fresh state. Sending EOF with ctrl + d will seem to just skip confirming the password.

brian@matrix-precision-3480-syzygy:~/workspace/Polykey-CLI/ > npm run polykey -- agent start -np ./tmp/test6

> polykey-cli@0.1.8 polykey
> ts-node src/polykey.ts agent start -np ./tmp/test6

✔ Enter new password … ********
✖ Confirm new password … // `ctrl + d` here to send `EOF`
(node:1198380) [DEP0112] DeprecationWarning: Socket.prototype._handle is deprecated
(Use `node --trace-deprecation ...` to show where the warning was created)
pid             1198380
nodeId          vvjefvesag6d11es3hpkdg8po4osiq8a1luq2gk4e8r1qh95eviv0
clientHost      ::1
clientPort      46261
agentHost       ::
agentPort       60631
recoveryCode    pottery assume scrap upon sad tackle hazard now mother sponsor aunt prison alcohol arm rough rifle clay twice team cool jewel devote letter misery

As you can see we are prompted twice for the password when creating new state. But sending ctrl+d on the 2nd promp allows us to skip it.

To Reproduce

  1. Start polykey with polykey agent start with no existing state to create a new node.
  2. Enter a password when first prompted
  3. Press ctrl+d when prompted to confirm
  4. polykey starts without failing.

Expected behavior

It's expected that if we provide the wrong password or no password when confirming the password then starting polykey should fail.

Platform (please complete the following information)

  • Device: precision laptop
  • OS: nixos
  • Version 23

Additional context

Found when looking into the problem with #139

Notify maintainers

@tegefaulkes

@tegefaulkes tegefaulkes added the bug Something isn't working label Feb 26, 2024
@CMCDragonkai CMCDragonkai changed the title skip password confirmation when starting polykey Skip password confirmation when starting polykey May 13, 2024
@tegefaulkes
Copy link
Contributor Author

Turned out to be a very minor bug in the prompting logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working r&d:polykey:supporting activity Supporting core activity
Development

No branches or pull requests

2 participants