nextcloud / mail

💌 Mail app for Nextcloud
https://apps.nextcloud.com/apps/mail
GNU Affero General Public License v3.0
830 stars 257 forks source link

Mail app unexpectedly turns file name in email body into URL #6237

Open Helium314 opened 2 years ago

Helium314 commented 2 years ago

Steps to reproduce

  1. send mail with content
    /home/user/something/text.txt
    /home/user/something/text.js
    /home/user/something/text.html
    /home/user/something/text.java
  2. check mail in nextcloud mail app

Expected behavior

see

/home/user/something/text.txt
/home/user/something/text.js
/home/user/something/text.html
/home/user/something/text.java

Actual behavior

see

/home/user/something/text.txt
/home/user/something/text.js
/home/user/something/text.html
/home/user/something/http://text.java/

Mail app version

1.11.7

Mailserver or service

does not matter

Operating system

Ubuntu 20.04

PHP engine version

PHP 7.4

Web server

Nginx

Database

MariaDB

Additional info

No response

miaulalala commented 2 years ago

Are you trying to send an attachment?

Helium314 commented 2 years ago

All it takes me to reproduce it is sending a mail with the text above.

For the use where I stumbled across the problem I could indeed use an attachment instead, but I think that's not the point here.

miaulalala commented 2 years ago

Thanks. Looks like the text parsing is misinterpreting some stuff. Was this a HTML email or plain text?

Could you also share the raw email body possibly?

Helium314 commented 2 years ago

I don't know which part exactly the body is, so I cut down the output of Thunderbird's "view source" to the last parts:

To: <censored>
Cc: 
Subject: test
Message-ID: <20220414141835.Horde.6NlWALrkVlf6uOTSNkRWUY3@<censored>.com>
User-Agent: Horde Application Framework 5
Date: Thu, 14 Apr 2022 14:18:35 +0000
Content-Type: text/plain; charset=utf-8
X-Rspamd-Score: -2.98 / 15.00 / 15.00
X-MBO-SPAM-Probability: 
X-Rspamd-Queue-Id: 1651AA51DE
X-Antivirus: AVG (VPS 220414-2, 4/14/2022), Inbound message
X-Antivirus-Status: Clean

/home/user/something/text.txt
/home/user/something/text.js
/home/user/something/text.html
/home/user/something/text.java
ChristophWurst commented 2 months ago

Confirmed