Bug 125950 - A comma in a document filename breaks the "Send Document as E-mail Attachment" feature when Thunderbird is used [ CONFIGURATION | FILESAVE ]
Summary: A comma in a document filename breaks the "Send Document as E-mail Attachment...
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.0.3 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL: https://bugzilla.mozilla.org/show_bug...
Whiteboard:
Keywords:
: 155924 157721 (view as bug list)
Depends on:
Blocks: File-Send Thunderbird-Interoperability
  Show dependency treegraph
 
Reported: 2019-06-16 09:22 UTC by Andrej Dundovic
Modified: 2023-10-26 13:31 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrej Dundovic 2019-06-16 09:22:32 UTC
Description:
A comma in a document filename breaks the "Send Document as E-mail Attachment" feature when Thunderbird is used (Error: the document cannot be found). Probably when a filename is passed to an mail client, the filename string is not enclosed in quotes, or "dangerous" characters are not escaped. Attaching the same document directly to a Thunderbird new mail window works as expected.

Steps to Reproduce:
1. Create a new LibreOffice document (from Writer for example)
2. Save it as a filename with a comma in it (for example: some, document.odt)
3. Use Thunderbird as the default mail client in LibreOffice Internet Settings (Send Documents as E-Mail Attachments)
4. Use send to e-mail feature to automatically attach the file in a new mail


Actual Results:
An error occurs: the file cannot be found where the quoted string path of the document stops just before the first comma in the filename. 

Expected Results:
The document is expected to be attached whatever the name is given if one already managed to save the file, i.e., if LibreOffice allowed the filename format, all features should work.


Reproducible: Always


User Profile Reset: No



Additional Info:
Tested also with KMail as the default e-mail client, and with it, the feature works as expected, even with commas within documents' filenames. Thus, I had assumed this is not a LibreOffice issue but the Thunderbird one. However, Thunderbird works perfectly when attaching documents in a various ways, therefore, the interface between the two can be the one to blame.
Comment 1 m_a_riosv 2019-06-16 09:53:44 UTC
No repro on windows 10
Version: 6.3.0.0.beta1 (x64)
Build ID: a187af327633f5f00363be5131bd21a13e0f1a7b
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: es-ES (es_ES); UI-Language: en-US Calc: CL
Comment 2 Dieter 2019-10-21 09:11:14 UTC
I also can't confirm it with

Version: 6.3.3.1 (x64)
Build-ID: f41f4c7f9507aeca13cb9df51f34d80e8ba30a99
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: threaded

and Thunderbird 60.9.0 (32-Bit)

Andrej, does it also happen with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ? I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version. Change to RESOLVED WORKSFORME, if the problem went away.

Please also paste informations form Help => About LibreOffice
Comment 3 Andrej Dundovic 2019-11-04 08:00:45 UTC
Hi Dieter,

I've installed RPMs of LO 6.3 directly from the official download page and tested - the bug still exists, i.e., LO doesn't forward the full path of the file, only up to the first comma. If you don't observe it, maybe it is related to LO on Linux platforms only.
Comment 4 Andrej Dundovic 2019-11-04 08:07:28 UTC
Sorry, I forgot to attach the version info:

Version: 6.3.3.2
Build ID: a64200df03143b798afd1ec74a12ab50359878ed
CPU threads: 8; OS: Linux 5.3; UI render: default; VCL: kde5; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 5 Rizal Muttaqin 2019-11-13 11:00:45 UTC
Set to NEW

Reproducible, got this error message in Thunderbird:

The file file:///tmp/lu3463x5rs38.tmp/lu3463x5rs3h.tmp/tes koma does not exist so could not be attached to the message.

Filename: Tes koma, yo.odt

Thunderbird 60.9.0 (64-bit)

LibreOffice:
Versi: 6.4.0.0.alpha1+
ID Build: 145672243d16a827dfd14a7b4e5cc0b7dd6f8751
Thread CPU: 4; OS: Linux 4.15; Render UI: baku; VCL: qt5; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-11-08_14:25:34
Locale: id-ID (id_ID.UTF-8); UI-Language: id-ID
Calc: threaded

GNU/Linux version: Ubuntu 16.04.6 LTS

$ uname -a
4.15.0-65-generic #74~16.04.1-Ubuntu SMP Wed Sep 18 09:51:44 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Comment 6 Stéphane Guillou (stragu) 2023-03-09 12:28:50 UTC
I'm closing as "not our bug":

The warning window is from Thunderbird, and there is a ticket for this issue on Thunderbird's bug tracker, opened back in 2013:

https://bugzilla.mozilla.org/show_bug.cgi?id=900117

Attaching the same file from Thunderbird does work, but using the command line:

   thunderbird -compose "attachment='/home/stragu/Downloads/with,koma.odt'"

... gives the same error message.

So, unrelated to LibreOffice.
Comment 7 Stéphane Guillou (stragu) 2023-07-29 14:29:29 UTC
*** Bug 155924 has been marked as a duplicate of this bug. ***
Comment 8 Stéphane Guillou (stragu) 2023-07-29 14:31:10 UTC
Same in LO 5.4.0.3.
Adding the Thunderbird meta just to keep track of it.
Comment 9 Stéphane Guillou (stragu) 2023-07-29 14:40:41 UTC
Wondering if a character encoding workaround like this would work: https://superuser.com/a/876269
Comment 10 Mike Kaganski 2023-07-29 18:42:11 UTC
But *possibly* we could use a file URL, and URL-encode the comma, to workaround. The problem is to make sure to avoid regressions with other mail agents, so this workaround should be limited to thunderbirs case.
Comment 11 Stéphane Guillou (stragu) 2023-10-26 11:35:18 UTC
*** Bug 157721 has been marked as a duplicate of this bug. ***
Comment 12 Stéphane Guillou (stragu) 2023-10-26 11:36:27 UTC
Also affects contents of Subject and Body in macros using com.sun.star.system.SimpleCommandMail, see duplicate bug 157721.
Comment 13 TISSENDIER Pierre 2023-10-26 13:31:12 UTC Comment hidden (noise)