Bug 155924 - Send as email does not work when filename contains a comma
Summary: Send as email does not work when filename contains a comma
Status: RESOLVED DUPLICATE of bug 125950
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.5.1 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-19 12:01 UTC by Andreas Heinlein
Modified: 2023-07-29 14:29 UTC (History)
0 users

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 Andreas Heinlein 2023-06-19 12:01:41 UTC
The "Send as Email" button in write does not work when the filename contains a comma.

To reproduce:

1. Save a file as e.g. "Testfile for foo, bar and baz".
2. Click "Send as email"
3. Error says "The file file:///tmp/xyz.tmp/Testfile for foo" does not exist"

Note that in the error message, the filename is cut off right before the comma. So I guess that somewhere the comma is taken as a delimiter where it should have been quoted instead.

This happens in Debian 11 with LO 7.4.5.1 from bullseye-backports. E-Mail-Handler is set to "sensible-lomua, which I believe is the default.
Comment 1 Mike Kaganski 2023-06-19 12:44:55 UTC
No repro using Windows 10 and Thunderbird:

LibreOffice Version: 7.5.4.2 (X86_64) / LibreOffice Community
Build ID: 36ccfdc35048b057fd9854c757a8b67ec53977b6
CPU threads: 12; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL threaded

and TB 102.12.0 (64-bit)

But indeed, the code doing this on Linux is different; much of the work is done in a shell script [1]; file URL is constructed there concatenating "file://" to a system filepath (which is passed from [2]) and passing to a special 'uri-encode' program [3].

The question is: what produces the error? The comma in the URL is valid. Should this bug be filed against the mailer? Which is the command line (which you likely can obtain from system, when the error is shown to you) of the process that shows the error?

[1] https://opengrok.libreoffice.org/xref/core/shell/source/unix/misc/senddoc.sh?r=70bcf9e8
[2] https://opengrok.libreoffice.org/xref/core/shell/source/cmdmail/cmdmailsuppl.cxx?r=91ba9654#250
[3] https://opengrok.libreoffice.org/xref/core/shell/source/unix/misc/uri-encode.c?r=2b383d19
Comment 2 Stéphane Guillou (stragu) 2023-07-29 14:29:29 UTC
Andreas, I assume you have Thunderbird installed?
The issue lies in Thunderbird, please see bug 125950 comment 6.
Thank you!

*** This bug has been marked as a duplicate of bug 125950 ***