Closed Bug 1691235 Opened 4 years ago Closed 3 years ago

Sending the (with PGP encrypted) message failed - invalid parameter given to findKeyByEmail

Categories

(MailNews Core :: Security: OpenPGP, defect)

x86_64
Windows 10
defect

Tracking

(thunderbird_esr78 fixed)

RESOLVED FIXED
88 Branch
Tracking Status
thunderbird_esr78 --- fixed

People

(Reporter: mozilla-mail, Unassigned)

References

Details

(Whiteboard: [fixed by bug 1644085])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36

Steps to reproduce:

I'm using Thunderbird 78.7.1 (32bit) on Windows 10.

  1. compose new mail
  2. enter recipient mail address
  3. enter subject and mail text
  4. click on send

Actual results:

Error message appeared: "Senden der Nachricht fehlgeschlagen" (german for: "Sending the message failed")

I had a look in ErrorConsole and tried sending again to get some more information what is wrong:
(see also attached screenshot of the ErrorConsole)

00:28:03.950 in getEncryptionFlags, gSendEncrypted=true, gSendSigned=true enigmailMsgComposeOverlay.js:1718:13
00:28:04.028 getCryptParams parameters: from=0xAABC8CA13484D177, to=0xFF@damadmai.at, bcc=, hash=SHA256, flags=20673, ascii=0, errorObj=
Object { value: "" }
, logObj=
Object { }
encryption.jsm:86:13
00:28:04.028 getCryptParams, got: to=0xFF@damadmai.at, bcc= encryption.jsm:125:13
00:28:04.028 getCryptParams returning: encryption.jsm:178:13
00:28:04.028
Object { sender: "0xAABC8CA13484D177", sign: true, signatureHash: "SHA256", sigTypeClear: false, sigTypeDetached: true, encrypt: false, encryptToSender: false, armor: true, senderKeyIsExternal: false, to: (1) […], … }
encryption.jsm:179:13
00:28:04.185 sendFlags=000050c1 encryption.jsm:358:13
00:28:04.185 getCryptParams parameters: from=0xAABC8CA13484D177, to=0xFF@damadmai.at, bcc=, hash=SHA256, flags=20674, ascii=0, errorObj=
Object { value: "" }
, logObj=
Object { }
encryption.jsm:86:13
00:28:04.185 getCryptParams, got: to=0xFF@damadmai.at, bcc= encryption.jsm:125:13
00:28:04.185 getCryptParams returning: encryption.jsm:178:13
00:28:04.185
Object { sender: "0xAABC8CA13484D177", sign: false, signatureHash: "", sigTypeClear: false, sigTypeDetached: false, encrypt: true, encryptToSender: true, armor: true, senderKeyIsExternal: false, to: (1) […], … }
encryption.jsm:179:13
00:28:04.195 sendFlags=000050c2 encryption.jsm:358:13
00:28:04.195 CryptoAPI.sync() failed result: Error: invalid parameter given to findKeyByEmail
findKeyByEmail chrome://openpgp/content/modules/RNP.jsm:2488
encryptAndOrSign chrome://openpgp/content/modules/RNP.jsm:2352
sync chrome://openpgp/content/modules/cryptoAPI/interface.js:51
encryptMessageStart chrome://openpgp/content/modules/encryption.jsm:341
finishCryptoEncapsulation chrome://openpgp/content/modules/mimeEncrypt.jsm:571
interface.js:46:17
00:28:04.195 Error: failure in finishCryptoEncapsulation
finishCryptoEncapsulation chrome://openpgp/content/modules/mimeEncrypt.jsm:592
mimeEncrypt.jsm:607:15
00:28:04.195 mimeEncrypt.js: caught exception: Error
Message: 'failure in finishCryptoEncapsulation'
File: chrome://openpgp/content/modules/mimeEncrypt.jsm
Line: 592
Stack: finishCryptoEncapsulation@chrome://openpgp/content/modules/mimeEncrypt.jsm:592:15
00:28:04.196
Error: failure in finishCryptoEncapsulation mimeEncrypt.jsm:592:15
finishCryptoEncapsulation chrome://openpgp/content/modules/mimeEncrypt.jsm:592

Expected results:

Expected would be that no error happens and the mail is sent encrypted.

Just for the record, I tried to remove the key of the recipient, tried to send an encrypted mail again, got the apropriate error message that a key was not found and imported the recipient's key again what worked fine and the key is shown with status OK. Then again tried to send an encrypted and got the described error again.

Summary: Sending the (encrypted) message failed → Sending the (with PGP encrypted) message failed
OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64
Component: Message Compose Window → Security: OpenPGP
Product: Thunderbird → MailNews Core
Summary: Sending the (with PGP encrypted) message failed → Sending the (with PGP encrypted) message failed - invalid parameter given to findKeyByEmail

In your example the recipient email starts with 0x

Likely our code makes the incorrect conclusion that this is already a key id or a fingerprint id, and attempts to interpret the email address as an ID.

(In reply to Kai Engert (:KaiE:) from comment #3)

In your example the recipient email starts with 0x

Likely our code makes the incorrect conclusion that this is already a key id or a fingerprint id, and attempts to interpret the email address as an ID.

Thank you for the hint!
Using another UID of the same key I was able to successfully send a mail which could successfully be decrypted.
So your assumption seems to be correct.

In the fix for bug 1644085, we added changes that should fix this bug, too.

Thanks, now it should be possible to receive his encrypted E-Mails.

Marking fixed per comment 5, please reopen or comment if you still experience this bug.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
See Also: → 1644085
Whiteboard: [fixed by bug 1644085]
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: