From ce918b39ce326dc3382cd144e464f3127baf6d13 Mon Sep 17 00:00:00 2001 From: LucaBonamino Date: Wed, 23 Sep 2026 22:19:47 +0200 Subject: [PATCH 1/3] removing keys at failed encryption and decryption --- src/scripts/content.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/scripts/content.js b/src/scripts/content.js index 8e9c30e..ff2d62c 100644 --- a/src/scripts/content.js +++ b/src/scripts/content.js @@ -196,8 +196,6 @@ decryptButton.addEventListener("click", async () => { const plaintext = await decryptMessage(message, privateKey); decryptedText.value = plaintext; document.getElementById("decryptionResultArea").hidden = false; - privateKeyInput.value = ""; - privateKeyFile.value = ""; setStatus(decryptStatus, "✓ Message decrypted", true); } catch (error) { console.error("Decryption error:", error); @@ -212,6 +210,8 @@ decryptButton.addEventListener("click", async () => { } finally { decryptButton.disabled = false; decryptButton.textContent = "Decrypt Email"; + privateKeyInput.value = ""; + privateKeyFile.value = ""; } }); @@ -268,12 +268,6 @@ button.addEventListener("click", async () => { const enc = await encryptMessage(text, publicKey, senderPublicKey); const message = composeMessage(enc); await setEmailText(message); - publicKeyInput.value = ""; - publicKeyFile.value = ""; - if (senderPublicKeyInput.value) { - senderPublicKeyInput.value = ""; - senderPublicKeyFile.value = ""; - } } catch (error) { console.error("Encryption error:", error); @@ -285,5 +279,11 @@ button.addEventListener("click", async () => { } finally { button.disabled = false; button.textContent = "Encrypt Email"; + publicKeyInput.value = ""; + publicKeyFile.value = ""; + if (senderPublicKeyInput.value) { + senderPublicKeyInput.value = ""; + senderPublicKeyFile.value = ""; + } } }); From 4cae7042110f1622aa365e92ccf6aa8ab4dea4db Mon Sep 17 00:00:00 2001 From: LucaBonamino Date: Wed, 23 Sep 2026 22:29:00 +0200 Subject: [PATCH 2/3] dump manifest version --- src/manifest/manifest_common.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/manifest/manifest_common.json b/src/manifest/manifest_common.json index b81f701..bed1240 100644 --- a/src/manifest/manifest_common.json +++ b/src/manifest/manifest_common.json @@ -1,6 +1,6 @@ { "name": "Clavimit", - "version": "0.1.1", + "version": "0.1.2", "description": "Encrypt and decrypt Gmail messages locally using AES-256-GCM and RSA-OAEP.", "manifest_version": 3, From c4e2c4bc1db14e2058ac455dbb284f04eabba8ae Mon Sep 17 00:00:00 2001 From: LucaBonamino Date: Wed, 23 Sep 2026 22:39:03 +0200 Subject: [PATCH 3/3] read me fil update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3480fc2..0a9b61a 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ UI improvements, tests, documentation, validation, browser compatibility, and Gm If this is your first contribution, these are good places to start: -* [#3 — Clear key inputs after failed decryption](https://github.com/LucaBonamino/Clavimit/issues/3) +* [#7 — RSA key requirements are not validated](https://github.com/LucaBonamino/Clavimit/issues/14) * [#1 — Keep package and manifest versions synchronized](https://github.com/LucaBonamino/Clavimit/issues/1) * [See all good first issues](https://github.com/LucaBonamino/Clavimit/issues)