Page MenuHome GnuPG

GpgOL: Attachments with very long filenames might be hidden
Closed, InvalidPublic

Description

High as this is basically "data loss" if a user does not see an attachment that exists on a mail.

my attachment filename is

this is ä väry long filename_with some special! chárs to test it with gpgol- but how long is long enough maybe it needs to be veeeeeeeeeeeeeeeeeeery long with some more spääääääääääääääääääääääääääächial charthis iss.txt

max path long but it's only parsed as:

?utf-8?Q?this_is_=C3=A4_v=C3=A4ry_long_filename_with_some_special!_ch=C3=A1rs_to_test_it_with_gpgol-_but_how_long_is_long_enough_maybe_it_needs_to_be_veeeeeeeeeeeeeeeeeeery_long_with_some_more_sp=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4?="'

which is truncated.

The final name is: (With utf8 logged in a latin 1 file)
13:36:42/5288/mimedataprovider.cpp:create_attachment: Attachment filename: this is ä väry long filename with some special! chárs to test it with gpgol- but how long is long enough maybe it needs to be veeeeeeeeeeeeeeeeeeery long with some more spääääääääää

In the end we break with:

13:36:43/9956/mail.cpp:checkAttachments_o: Object: 2FD026F0 released ref: 0 
13:36:43/9956/mail.cpp:checkAttachments_o: Object: 2FD02170 released ref: 0 
13:36:43/9956/ERROR/mail.cpp:add_attachments_o: Ignoring attachment without display name.
13:36:43/9956/ERROR/common.c:get_tmp_outfile: Could not get a name out of 100 tries
13:36:43/9956/oomhelp.cpp:get_oom_object: looking for 2740BA68->`Attachments'
13:36:43/9956/oomhelp.cpp:get_oom_object: Object: 2740BA68 released ref: 2 
13:36:43/9956/oomhelp.cpp:get_oom_object: Object: 273A1AC0 released ref: 1 
13:36:43/9956/oomhelp.cpp:get_oom_object:         got 273A1AC0
13:36:43/9956/oomhelp.cpp:add_oom_attachment: error: invoking Add p=00000000 vt=0 hr=0x80020009 argErr=0x0
13:36:43/9956/oomhelp.cpp:dump_excepinfo: Exception: 
              wCode: 0x1000
              wReserved: 0x0
              source: Microsoft Outlook
              desc: Path does not exist. Verify the path is correct.
              help: null
              helpCtx: 0x0
              deferredFill: 00000000
              scode: 0x80070003
13:36:43/9956/oomhelp.cpp:add_oom_attachment: Object: 273A1AC0 released ref: 0 
13:36:43/9956/ERROR/mail.cpp:add_attachments_o: Failed to add attachment: this is ä väry long filename with some special! chárs to test it with gpgol- but how long is long enough maybe it needs to be veeeeeeeeeeeeeeeeeeery long with some more spääääääääää
13:36:43/9956/ERROR/mail.cpp:add_attachments_o: Failed to delete tmp attachment for: this is ä väry long filename with some special! chárs to test it with gpgol- but how long is long enough maybe it needs to be veeeeeeeeeeeeeeeeeeery long with some more spääääääääää
13:36:43/9956/mail.cpp:fixup_last_attachment_o: Content id not found.

Details

Version
master

Event Timeline

There were two things here:

  • The truncated attachment name was not a fault of GpgOL. This is Outlook. The names are truncated even if the mail is not encrypted.
  • Somehow the bug dissapeared. It might have been a side effect of a heap corruption. I add some more debug output to better analyse it when it comes again.