Page MenuHome GnuPG

[GpgOL] Forwarded Email send the previous version of the email and attached a dat file
Closed, ResolvedPublic

Description

Hello,

I found a strange bug that happens 2/3 times already.

I will try to explain it clearly (not an english person).

When I send a email to Bob with an attachment and a content, it works correctly.

Now when I go back to my Sent folder in Outlook, to find this email to resend it (because I want to change something), I click on Forward.

I put Bob email address. I remove in Subject FW: to have the same subject as my first email.
I remove the attachment, and then attached it again (I want to send a new revision for example, with the exact same name).
I remove or add a line in the body of the message.

When I send it, Bob receive the previous version of the email (the first version) with the old attachment and the old text.
The new version of the email is attached in a .dat file.

It is not clear to me what is happening, but I guess the bug can be serious.

It only works if I send the email to the same person, and if I delete and reattached the doc or ppt file for example.

I hope you have enough details.
The OS is Windows 10 with Outlook 365.

If you need more information, I can reproduce the bug again and maybe find additional details that can be useful.

Thanks for your help.
Regards

EDIT: I did some additional testing.
To have the bug you forward the email to the same person, you remove the attachment and you reattach it (same name), and you remove the FW: in the subject to have the same subject as the previous email. It should trigger the bug

EDIT2: I just did a new test. If I forward the email to the same receiver (bob), I don't touch the body or the subject, I just delete the attachment and reload the exact same (no modification of the attachment) it triggers the bug

Details

Version
GpgOL version 2.3.2 / GPG4Win version 3.1.5

Revisions and Commits

Event Timeline

MThib renamed this task from Forwarded Email send the previous version of the email and attached a dat file to [GpgOL] Forwarded Email send the previous version of the email and attached a dat file.Jan 11 2019, 7:19 PM
MThib created this task.
aheinecke triaged this task as High priority.
aheinecke added a subscriber: aheinecke.

Thank you for your detailed report. I agree that this can have serious consequences as it might send out unintended information. I'll look into it with high priority.

There appears to be something very fishy when forwarding from the sent mails folder. Even without attachments if I forward and modify the content the original message is sent out and not the modified one.

With attachments as you describe I get an:

Remote Server returned '550 5.6.0 M2MCVT.StorageError.Exception: ConversionFailedException - <unknown>, Content conversion: Invalid S/MIME encrypted message.; storage error in content conversion.'

When using outlook.com If I use an IMAP / Smtp server I only get the unmodified original mail again.

I guess that this was not yet reported because most people do not forward "sent" mails but use the "send message again" option.

@MThib What is the filename of the .dat with the original message, is it gpgolXXX.dat or winmail.dat and can you confirm that even without an attachment any modifications to the forwared mail are ignored and the mail is sent out as if it was send again?

Just to confirm that I'm looking at a similar situation.

Hello,

Thanks for taking care of the action.

I guessed the way I was forwarding the email was probably not often used.
If I can help by doing some testing, don't hesitate to ask me.

Regards

@aheinecke the file is gpgolXXX.dat. I never got the winmail.dat (I think).

No when I forward an email, modify it, and send it to the same person, it seems to be working correctly.

Regards

aheinecke changed the task status from Open to Testing.Jan 14 2019, 10:24 AM

I think I understand what is going on here:

  • When we encrypt / sign a message we create the MIME structure as a hidden attachment (gpgolXXX.dat), when the message is passed to the server outlook / exchange converts that to a proper MIME structure.
  • When forwarding a sent mail we did not remove that attachment. So the message had two attachments. One the MIME structure of the new mail, the other one the gpgolXXX.dat containing the MIME structure of the old mail.

--> This then resulted in confusion and weird behavior. It is up to the server how it handles this. Outlook.com just rejected it.

My fix now checks for that and removes the original structure.
In my tests it worked. Can you please confirm that the fix also works for you, as your behavior was slightly different.

A build with this fix is available as: https://files.gpg4win.org/Beta/gpgol/2.3.3-beta13/

See: https://wiki.gnupg.org/TroubleShooting#Manually_update_GpgOL_to_a_beta how to install it.

Hello,

Thanks to the remediation.

It seems to be working correctly, or at least almost.

It tried to reproduce the issue without success.

But when I copy past an image in the email, the image is not visible at all when I do the forward (in the second email)

The image is visible in the first email, but not in the forwarded email (the second one).
I am not removing it and pasting it again, I just do the forward without touching it.

It works correctly if I don't sign the email. the image is also correctly send. It does not work when I sign the email.
I did the test without attachment, just a message and a pasted picture.

Thanks for your work.
Regards

EDIT: In the sent mailbox, the picture is not visible is the first email as well.
Very curious behaviour

I've opened T4322 for the image embedding issue.

Hello,

Since today, I cannot send any Signed email. Outlook is crashing.
I guess it is due to the new version of GpgOL I installed.

I don't know what information I can send you to help you solve the issue. I don't know if it is related either.

I just send a normal email, no picture, no attached file.

Regards

3.1.6 is released please use that one.