Skip to content

Key inputs are not cleared after failed decryption #3

Description

@LucaBonamino

Summary

Key input fields are not always cleared when encryption or decryption fails.

Sensitive key material should be removed from the extension UI after an encryption or decryption attempt, regardless of whether the operation succeeds or fails.

Reproduction steps

Decryption

  1. Open the decryption interface.
  2. Enter or import a private key.
  3. Trigger a decryption operation that fails, for example by providing a non-Clavimit formatted encrypted message.
  4. Observe the private key field after the error.

Expected behavior

Public and private key inputs should be cleared after the corresponding encryption or decryption attempt finishes, independently on if the operation succeeds or fails.

Actual behavior

When an operation fails, the associated key input may remain populated in the extension UI.

Environment

  • Extension version shown in chrome://extensions: 0.1.1

Installation

  • Development version (Load unpacked)
  • Published Chrome Web Store version

Additional context

The existing cleanup behavior should be extended to failure paths as well. A finally block or equivalent cleanup mechanism could help ensure key material is consistently removed after each operation.

Please do not include private keys, sensitive email content, or other confidential information.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions