- Account.getEmail() returns always a string
- Add import for str_contains to DataUriParser
- IspDb.query return outdated docblock
- MimeMessage.parse update return type in docblock
- Suppress undefined function for str_contains (polyfill is shipped with nextcloud/3rdparty)
- Add type cast for IMAPMessage.loadBodyData to detect type properly
- Add type for mapSocketTypeToSecurity
- Suppress undefined class for doctrine
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Horde offers access to headers either unparsed, as stream or parsed into
an object. Before the patch we used the latter. That has the current bug
that it opens a PHP memory stream, parses into an object but leaves the
stream open. If this is done thousands of times, there is a considerate
amount of memory that doesn't get freed.
With the patch we request just the stream, trigger the parsing ourselves
and close the stream afterwards. This frees the memory.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
When IMAPMessage.toDbMessage() encountered an invalid messageId it was
creating a DB Message without messageId. This leads for example to
TagMapper::tagMessage() to fail because it must not be called with a
null messageId.
This patch leverages the functionality to create a valid messageId in
case the messageId was missing completely. It now uses it as well for
invalid messageIds not accepted by Horde_Mail_Rfc822_Identification and
therefore not set by Message.setMessageId().
An example for an invalid messageId I encountered in my inbox is
Message-ID: <359f166ea1b402e793c0801834a9722a-support@aruba-studios.de
(The closing > bracket is missing).
Signed-off-by: Anna Larch <anna@nextcloud.com>
We distinguish between attachments (content-disposition: attachment) and inlineAttachments (content-disposition: inline).
For html messages we have a filter to replace a reference inside the message with an url to embed the attachment into the message.
For plain text messages it's not possible to embed / inline an attachment. In this case we merge inline attachments into attachments.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Creates a new 'inlineAttachments' property for IMAPMessages to hold those 'inline attachments' (that's MIME parts having their content-disposition header set to 'inline')
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Threading still doesn't work for some messages. To debug this more
easily, especially for non devs, this adds a new action menu entry to
download all relevant threading data as a simple JSON. The maintainers
can then look at those files, put them into unit tests and see why they
messages don't group.
Again, this entry won't be shown on production instances but only if
debug mode is enabled.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* ID is supposed to be the database ID
* UID is the IMAP UID
* UUID is the globally unique identifier used in the front-end
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>