View Issue Details

IDProjectCategoryView StatusLast Update
0006035SOGoBackend Mailpublic2024-09-16 16:37
ReporterMichele Giacomoli Assigned Tosebastien  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version5.11.0 
Fixed in Version5.12.0 
Summary0006035: Cannot reply to malformed emails with empty images
Description

I received a malformed multipart e-mail with an empty image. When I try to view in the web interface get this log errors:

C[0x5596be99f460]: 12 uid fetch 24176 (BODY[2] BODY[3])
S[0x5596be15b350]: * 8548 FETCH (UID 24176 BODY[2] {0}
Sep 11 16:22:58 sogod [13]: <0x0x5596be15b350[NGImap4ResponseParser]> ERROR(-[NGImap4ResponseParser _parseData]): got content size '0'!
Sep 11 16:22:58 sogod [13]: <0x0x5596be15b350[NGImap4ResponseParser]> ERROR(-[NGImap4ResponseParser _parseBodyContent]): got no data.
Sep 11 16:22:58 sogod [13]: <0x0x5596be15b350[NGImap4ResponseParser]> ERROR: got no body content for key: 'body[2]'

When I try to reply to this e-mail I get the following errors:

2024-09-11 16:22:59.028 sogod[12:13] File NSData.m: 3502. In -[NSDataMappedFile initWithContentsOfMappedFile:] mapping failed for /var/spool/sogo/myuser/newDraft1726064578-1/developers.jpg - Invalid argument
2024-09-11 16:22:59.030 sogod[12:13] File NSData.m: 3502. In -[NSDataMappedFile initWithContentsOfMappedFile:] mapping failed for /var/spool/sogo/myuser/newDraft1726064578-1/developers.jpg - Invalid argument
2024-09-11 16:22:59.031 sogod[12:13] File NSData.m: 3502. In -[NSDataMappedFile initWithContentsOfMappedFile:] mapping failed for /tmp/OGo000D66E1A7C3C7.tmp - Invalid argument
2024-09-11 16:22:59.031 sogod[12:13] EXCEPTION: <NSException: 0x5596bdde4060> NAME:NSInvalidArgumentException REASON:[NSString+stringWithUTF8String:]: NULL cString INFO:(null)

On the web interface I get a "Request failed" notification at the bottom right of the window and the reply form doesn't appear.

You can find as attachment a test e-mail I crafted to reproduce the issue.

Steps To Reproduce
  • Save the mail attached into your inbox
  • Try to view the mail. You should be able to view it, and also see the NGImap4ResponseParser log errors
  • Try to reply to the mail. Nothing should appear but and error notification saying "Request failed". Also some NSDataMappedFile errors should appear in the logs
TagsNo tags attached.

Activities

Michele Giacomoli

Michele Giacomoli

2024-09-11 14:48

reporter  

empty_image.eml (889 bytes)   
To: Michele Giacomoli <mgiacomoli@example.com>
From: Michele Giacomoli  <mgiacomoli@example.com>
Subject: Test Sogo
Content-Type: multipart/related;
 boundary="------------6G50WaW00J2STjCB0WzwxPeQ"

--------------6G50WaW00J2STjCB0WzwxPeQ
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html>
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hola</p>
    <img moz-do-not-send="false"
      src="cid:part1.mElEb40R.z2RXgmNU@example.com" alt="developers"
      width="425" height="319">
  </body>
</html>
--------------6G50WaW00J2STjCB0WzwxPeQ
Content-Type: image/jpeg; name="developers.jpg"
Content-Disposition: inline; filename="developers.jpg"
Content-Id: <part1.mElEb40R.z2RXgmNU@example.com>
Content-Transfer-Encoding: base64
empty_image.eml (889 bytes)   
sebastien

sebastien

2024-09-13 13:55

administrator   ~0017879

Hi,

Fixed in https://github.com/Alinto/sogo/commit/59d48cb38285ab019013972baa3e5269b6188a5e

Can you try NB 20240914 ?

Sebastien

Michele Giacomoli

Michele Giacomoli

2024-09-16 13:22

reporter   ~0017888

Hi Sebastien,
Tried with commit 59d48cb and this fixes the issue. Thanks

Issue History

Date Modified Username Field Change
2024-09-11 14:48 Michele Giacomoli New Issue
2024-09-11 14:48 Michele Giacomoli File Added: empty_image.eml
2024-09-13 13:55 sebastien Note Added: 0017879
2024-09-13 13:55 sebastien Assigned To => sebastien
2024-09-13 13:55 sebastien Status new => feedback
2024-09-16 13:22 Michele Giacomoli Note Added: 0017888
2024-09-16 13:22 Michele Giacomoli Status feedback => assigned
2024-09-16 16:37 sebastien Status assigned => resolved
2024-09-16 16:37 sebastien Resolution open => fixed
2024-09-16 16:37 sebastien Fixed in Version => 5.12.0