Skip to content

Incorrectly displays "unprotected key" warning when user loads private key then switch to pasting ASCII armored key in My Keys -> Add key #5952

@martgil

Description

@martgil

In add_key.htm of My Keys -> Add, the warning message This key is unprotected. Create a pass phrase or use a random one is displayed when a user tries to import the private key file then close the file dialog and proceed to pasting the ASCII armored private key. This is a minor issue hence they will be confused that their key might've been unprotected by passphrase when in fact its a FlowCrypt user bug which incorrectly detects the flow of the previous process after user closes the file dialog.

Screenshot:

Image

Steps to reproduce:

User should already have FlowCrypt setup and valid keys imported to it.

  1. Go to FlowCrypt Settings -> My keys.
  2. Click on Add Key.
  3. Click on Load from a file and then, close the file dialog. (do not choose your private key, for instance, user change of mind).
  4. Click on Paste armored key directly.
  5. [Important step] Paste a valid and password-protected ASCII armored private key.
  6. Observe you'll be seeing the following warning that the private you've pasted is unprotected.

Expected behavior:
The message This key is unprotected. Create a pass phrase or use a random one should not be displayed when user doesn't go for generating a new key.

Current behavior:
The aforementioned message is displayed even when the user selected Paste armored key directly from which they would be providing the existing key private key.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions