View Issue Details

IDProjectCategoryView StatusLast Update
0003581SOGoWeb Mailpublic2016-03-18 13:11
Reporterst41ker Assigned Toludovic  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformanyOSanyOS Versionany
Product Version2.3.8 
Fixed in Version2.3.10 
Summary0003581: 500 HTTP error during encrypted email forwarding
Description

If you try to forward encrypted email via SoGo web interface ("Forward messages" preference must be set to "Inline") then 500 error appears in browser.

SoGo log follows:

Mar 14 16:10:27 sogod [1085]: <0x0x7f1024954c18[NGImap4ResponseParser]> ERROR(-[NGImap4ResponseParser _parseData]): got content size
'0'!
Mar 14 16:10:27 sogod [1085]: <0x0x7f1024954c18[NGImap4ResponseParser]> ERROR(-[NGImap4ResponseParser _parseBodyContent]): got no dat
a.
Mar 14 16:10:27 sogod [1085]: <0x0x7f1024954c18[NGImap4ResponseParser]> ERROR: got no body content for key: 'body[1]'
EXCEPTION: <NSException: 0x7f10249ba0b8> NAME:NSInvalidArgumentException REASON:Tried to add nil to array INFO:(null)

If "Forward messages" set to "As attachment" everything works.

Steps To Reproduce
  1. Set "Forward messages" to "Inline" in the Mail Options.
  2. Send encrypted email to SoGo mailbox.
  3. Press "Forward" button on the web interface to forward that email.
TagsNo tags attached.

Activities

ludovic

ludovic

2016-03-14 10:47

administrator   ~0009741

Please attach to this ticket a test mail in EML format.

st41ker

st41ker

2016-03-14 10:49

reporter  

Test.eml (2,330 bytes)
st41ker

st41ker

2016-03-14 10:49

reporter   ~0009742

Uploaded test email.

ludovic

ludovic

2016-03-14 11:28

administrator   ~0009743

I don't have this problem.

Try to produce a stacktrace: http://sogo.nu/nc/support/faq/article/how-do-i-debug-sogo-2.html

st41ker

st41ker

2016-03-14 14:04

reporter   ~0009744

Last edited: 2016-03-14 14:05

That is a patched SoGo installation. Patch from http://sogo.nu/bugs/view.php?id=3576

Unfortunately, the server is under production, and used by users.
I'll try to debug it in non business time.

tfu

tfu

2016-03-17 15:35

reporter   ~0009785

Problem is a attachment of size 0:
--===============0901805523==
Content-Type: application/pgp-encrypted; Version="1"
MIME-Version: 1.0

Please test attached patch and provide feedback.

st41ker

st41ker

2016-03-17 15:42

reporter   ~0009786

I'm not seeing any attaches, except the Test.eml.

tfu

tfu

2016-03-17 15:54

reporter  

0018-3581.patch (911 bytes)   
From 359965e827f56eb95c919cc62f58e9637be55495 Mon Sep 17 00:00:00 2001
From: root <root@poldi2.hopto.org>
Date: Thu, 17 Mar 2016 10:58:41 +0100
Subject: [PATCH 18/18] 3581

---
 SoObjects/Mailer/SOGoDraftObject.m | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/SoObjects/Mailer/SOGoDraftObject.m b/SoObjects/Mailer/SOGoDraftObject.m
index 4fadcea..bcc5757 100644
--- a/SoObjects/Mailer/SOGoDraftObject.m
+++ b/SoObjects/Mailer/SOGoDraftObject.m
@@ -844,7 +844,11 @@ static NSString    *userAgent      = nil;
   while ((currentKey = [attachmentKeys nextObject]))
     {
       body = [fetch objectForKey: [currentKey lowercaseString]];
-      [bodies addObject: [body objectForKey: @"data"]];
+
+      if (body)
+        [bodies addObject: [body objectForKey: @"data"]];
+      else
+        [bodies addObject: [[[NSData alloc] init] autorelease]];
     }
 
   return bodies;
-- 
2.1.4

0018-3581.patch (911 bytes)   
st41ker

st41ker

2016-03-18 09:27

reporter   ~0009790

Today I've tested the patch. Error is gone, and everything works as expected.
Thank you.

Related Changesets

sogo: v2 f16cc609

2016-03-18 12:54:00

ludovic

Details Diff
(fix) handle empty body data correctly (fixes 0003581) Affected Issues
0003581
mod - SoObjects/Mailer/SOGoDraftObject.m Diff File

sogo: master 638dbc90

2016-03-18 12:54:00

ludovic

Details Diff
(fix) handle empty body data correctly (fixes 0003581) Affected Issues
0003581
mod - SoObjects/Mailer/SOGoDraftObject.m Diff File

Issue History

Date Modified Username Field Change
2016-03-14 10:23 st41ker New Issue
2016-03-14 10:47 ludovic Note Added: 0009741
2016-03-14 10:49 st41ker File Added: Test.eml
2016-03-14 10:49 st41ker Note Added: 0009742
2016-03-14 11:28 ludovic Note Added: 0009743
2016-03-14 14:04 st41ker Note Added: 0009744
2016-03-14 14:05 st41ker Note Edited: 0009744
2016-03-17 15:35 tfu Note Added: 0009785
2016-03-17 15:42 st41ker Note Added: 0009786
2016-03-17 15:54 tfu File Added: 0018-3581.patch
2016-03-18 09:27 st41ker Note Added: 0009790
2016-03-18 12:55 ludovic Changeset attached => sogo v2 f16cc609
2016-03-18 12:55 ludovic Assigned To => ludovic
2016-03-18 12:55 ludovic Resolution open => fixed
2016-03-18 12:55 ludovic Changeset attached => sogo master 638dbc90
2016-03-18 13:11 ludovic Status new => resolved
2016-03-18 13:11 ludovic Fixed in Version => 2.3.10