Page MenuHome GnuPG

GpgOL: Opened/Closed encrypted pgp messages unencrypted when read as plain is enabled
Closed, ResolvedPublic

Description

To reproduce:

  1. Active the setting "read as plain": File -> Options -> Trustcenter: Trust Center Settings -> Email Security: (x) Read all standard mail in plain text
  2. Send a pgp encrypted mail with some content (signed/unsigned does not matter)
  3. Preview the mail -> "converted into plain text", no content
  4. Open the mail -> "converted into plain text", but no content
  5. Close the mail, deselect and reselect the mail in the list -> no "converted into plain text" message anymore, mail content is shown (converted, unencrypted)

Notes:

  • S/MIME mails are not affected by this.
  • Probably related issue regarding the content not shown: https://dev.gnupg.org/T7843
  • This is independent of mail format (html/rich/text)
  • The message is saved on close (at least it's still ok in the list, while the mail is open)

gpgol.log:

Details

Version
vsd-3.3.3-beta90.19 @ win10

Event Timeline

timegrid created this object in space Restricted Space.
timegrid created this object with visibility "g10code (Project)".
timegrid created this object with edit policy "g10code (Project)".

In pgp signed unencrypted text mails it happens, too, that first the "converted to plain text" message is shown without content, and after open/close the message is gone and the content is displayed.

At which point did were you asked for the passphrase for decryption? You flushed the gpg-agent cache, right?

Happens on vsd 3.3.2, too.

I can read the plain text message in outlook web, so it is definitly unencrypted:

We did decrypt the mail successfully and called put_oom_string to update the Body successfully, but for some reason for new mails the put calls succeed but the displayed Text is not updated i.e. no "OpenGPG Message Please wait..." or decrypted message.
When closing the mail window the mail is still open in the preview pane and we should get back the mail content (Body), but we don't get back what we set with the put call but what is displayed i.e nothing (empty string).
So we pass on the close call which does write back our put value. (Plaintext leak)

Fix we put an empty string into the body before passing.

Note: if you select an other mail in explorer and then back to the new empty mail, it gets decrypted again and no longer is empty showing the decrypted content.

With the beta-25 the body of the mail is not saved back to the server any more but the security level tags are. So the test mail still seems to be a signed and decrypted empty mail even if you deactivate gpgol.

additionally, the body of the messages is (in most cases) not shown any more.

Even if the body of the decrypted mail is shown (in plain text), choosing "display as HTML" does not show the HTML part (msg to Edward, 2025-10-17, 11:10)
When no message at all is shown in the plain part, this does not change with choosing "display as HTML" either (msg to edward, 11:42 and 11:48)

When deactivating "Read as plain", the messages HTML version is shown and the text is there.

ebo changed the task status from Open to Testing.Wed, Oct 29, 8:43 AM
ebo triaged this task as High priority.
ebo moved this task from Backlog to QA on the vsd33 board.
ebo moved this task from Backlog to Done on the gpgol board.

with 3.3.90.29-Beta:

It looks on the first checks as if this fixes the leak but a) the UX is really bad for decrypting a mail for the fist time, it is NOT a case of click a second time, see gif.
And b) some other signed/encrypted mails can't be selected any more, too, see example gif for the sent folder. Seen also for a pgp-inline mail. Also, these mails are always empty, even if I open them in a separate window (instead of preview, where no mail at all is shown, not even the header).

Have a look at the log.

I saw no "the message was changed, do you want to save?" messages any more

This is a gif to show the UX. It is to complicated for words…

ebo changed the task status from Testing to Open.Wed, Oct 29, 9:56 AM
ebo moved this task from Done to WIP on the gpgol board.

And when I switch of read-as-plain, both testmails in the inbox are displayed as expected but one of the ones from the sent-folder has an empty body:

Test with beta32

with read-as-plain set, gpg al combinations with sign+encrypt:

  • no leak with the procedure from the description any more
  • the security level tags are kept encrypted, too
  • mail is displayed on first reception like this, with the content in a .txt file:


Which is necessary to avoid the leak due to a seeming bug in Outlook.
After deselecting and selecting the mail again (it has to be marked as read when reselecting it) the text is then displayed in the body as normal:

Should the text not be displayed in the body in some few cases (in the Sent folder it is always the case), toggling read/unread helps.
For S/MIME the text is usually directly shown in the body, only text of signed only mails is shown on the first view as .txt attachment.

Change of displayed security level still works even when the text is displayed as attachment (did not work in an earlier test version).

So far for today. But timegrid seems to have found some data loss issue regarding S/MIME encrypted mails with this beta-version which is probably related to the changes from this ticket. Further investigation needed.

ebo edited projects, added vsd33 (vsd-3.3.3); removed vsd33.
ebo moved this task from WIP to Done on the gpgol board.EditedThu, Nov 6, 2:32 PM

This here is resolved, for timegrids findings see other ticket, the issue is not related to the one from this ticket and no regression, as it turned out. And difficult to trigger.

werner claimed this task.
werner shifted this object from the Restricted Space space to the S1 Public space.
werner changed the visibility from "g10code (Project)" to "Public (No Login Required)".