https://bugs.documentfoundation.org/show_bug.cgi?id=172966

            Bug ID: 172966
           Summary: Sending attachment to Thunderbird fails
           Product: LibreOffice
           Version: 26.2.0.0 alpha0+ master
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: LibreOffice
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
            Blocks: 154755

Reported in bug 162632 comment 22:

I can reproduce a very similar failure on Linux (not a snap/flatpak build), and
I think it points at the same root cause discussed above: the attachment list
gets comma-joined without escaping before being handed to xdg-email, so
anything that makes that list contain more than the expected single entry
breaks the resulting URL — not just a literal comma in the filename (see also
bug 125950 / bug 155924).

Environment:
- LibreOffice 26.2.5.2 (Build:2)
- Garuda Linux (Arch-based), KDE Plasma, Wayland session
- Default mailto handler: Thunderbird, via a plain
"userapp-Thunderbird-*.desktop" launcher (Exec=/usr/lib/thunderbird/thunderbird
%u), no snap/flatpak involved
- No custom MailerProgram override in LibreOffice's own settings — the system
default handler is used

Steps to reproduce:
1. Open any plain .odt file (no special filename characters, no comma).
2. File > Send > Document as E-mail (or "E-mail as OpenDocument Text").
3. LibreOffice shows: "The file <path> does not exist and therefore could not
be attached to the message."

What's notable is the malformed path shown in the error dialog. Example (from a
document named "Apuntes lección magistral.odt", no comma anywhere in the name
or path):

file:///tmp/lu13968790pbw.tmp/lu13968790pbz.tmp/namefile.odt%2C/tmp/lu13968790pbw.tmp/lu13968790pbz.tmp/namefile.odt

This is the SAME temp file path listed twice, concatenated with "%2C" (a
URL-encoded comma) in between — the second occurrence is missing the "file://"
scheme, and none of the actual spaces in the filename are percent-encoded, only
the comma-as-separator is. This strongly suggests the same attachment entry is
being added twice to the internal attachment list, and when that list (now with
a duplicate) gets joined with "," to build the attach= value, the result is no
longer a single valid URL, so LibreOffice's own existence check fails before
xdg-email is even invoked.

I get the identical pattern (single file, duplicated + joined with %2C) with a
second, unrelated document that has Zotero/Better BibTeX reference fields
embedded, so this isn't specific to any document content or extension — it
reproduces with a brand-new, plain .odt with no special characters in the name.

Given 125950/155924 already establish that a literal comma in the filename
breaks this same comma-joined attach list, my guess is that the fix should
address the delimiter itself (proper escaping/quoting of each attachment path,
or switching xdg-email invocation to repeated --attach arguments as proposed
above) rather than just filename sanitization — since here the failure happens
with zero commas in the name, from what looks like a duplicate list entry.

(end quote)

I reproduce this with the oldest of 26.2 repo on Linux and with fresh master,
Thunderbird 153. However, I did not have this issue in 2024 with 24.8. We
should find out, if the regression happened in LibreOffice or Thunderbird.
Unfortunately I can't run versions older than 26.2 on my system and with
Distrobox the email integration doesn't work.


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=154755
[Bug 154755] [META] Thunderbird interoperability and integration
-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to