Bug#920423: sogo: Exception thrown on "rich" email view after 4.0.5 upgrade (from 3.2.6)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#920423: sogo: Exception thrown on "rich" email view after 4.0.5 upgrade (from 3.2.6)

Matthew Hall
Package: sogo
Version: 4.0.5-2
Severity: grave
Justification: renders package unusable

Dear Maintainer,

I’ve just upgraded (and due to reasons entirely my fault, I’ve realised I have no downgrade path… backup fail) from 3.2.6 (I believe it was) to 4.0.5.

It’s a Debian box, using the “official Debian sogo packages” - I’m now running on Debian Buster (due for release later this year).

Everything is working a charm - upgrading the database appears to have worked perfectly - all except the “/view” URL used by the AJAX UI for retrieving a “rich” email from a folder...
(So by extension, I simply cannot view emails in the SOGo webmail client.)

Works using “viewsource” (as in, the SOGo 'viewsource' button works - which makes sense because I can see the IMAP debug is working properly on the backend), and the headers download properly etc.  I’m seeing an exception thrown in the logs:


Jan 24 22:41:11 sogod [2864]: <0x0x560efac4c220[NGImap4Client]> TLS started successfully.
Jan 24 22:41:11 sogod [2864]: 10.0.90.34, 10.0.20.10, 10.0.20.11 "GET /SOGo/so/matthewhall/Mail/0/folderINBOX/64252/viewsource HTTP/1.1" 200 1584/0 0.549 4041 60% 0
(worked)


Jan 24 22:41:11 sogod [2864]: <0x0x560efac4cae0[NGImap4Client]> TLS started successfully.
2019-01-24 22:41:12.503 sogod[2864:2864] EXCEPTION: <NSException: 0x560efb64a450> NAME:NSInvalidArgumentException REASON:[NSString+stringWithString:]: NULL string INFO:(null)
Jan 24 22:41:12 sogod [2864]: 10.0.90.34, 10.0.20.10, 10.0.20.11 "GET /SOGo/so/matthewhall/Mail/0/folderINBOX/64252/view HTTP/1.1" 501 0/0 0.550 - - 0
(failed)


(Note it’s a “GET” request and not a “POST” because I’m reproducing it manually, not via the AJAX UI in this example.)

I’ve tried with all the debugging enabled in sogo.conf and I don’t see anything unusual: IMAP works perfectly, then sogod throws the exception above.

Any ideas?  I’ve exhausted all my own - and I can’t see that it’s a known bug (I've also reached out to the SOGo user's mailing list on the off-chance).
I’ve by-hand confirmed the database structure looks correct for a 4.0.5, but I may have overlooked something.  I briefly tried it against a fresh database too, and that behaved the same (again, unless I was overlooking something silly).

I cannot rule out the possibility of user error on my behalf - but I'm 90% confident it's an issue in the 4.0.5-2 package.
(I've not been able to try other 4.0.x debian packages - but can do so if they are available.)

No other obvious issues like missing packages etc.

Very happy to provide any other information like database schemas etc if that would help.


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages sogo depends on:
ii  adduser               3.118
ii  gnustep-base-runtime  1.26.0-2
ii  libc6                 2.28-5
ii  libcurl3-gnutls       7.63.0-1
ii  libgcc1               1:8.2.0-14
ii  libglib2.0-0          2.58.2-3
ii  libgnustep-base1.26   1.26.0-2
ii  libgnutls30           3.6.5-2
ii  liblasso3             2.6.0-2+b2
ii  libmemcached11        1.0.18-4.2
ii  libobjc4              8.2.0-14
ii  libsbjson2.3          2.3.2-4+b1
ii  libsope1              4.0.5-2
ii  lsb-base              10.2018112800
ii  memcached             1.5.6-1
ii  sogo-common           4.0.5-2
ii  systemd               240-4
ii  zip                   3.0-11+b1

sogo recommends no packages.

Versions of packages sogo suggests:
pn  postgresql | default-mysql-server | virtual-mysql-server  <none>

-- Configuration Files:
/etc/cron.d/sogo changed:
* * * * *      sogo /usr/sbin/sogo-ealarms-notify > /dev/null 2>&1

/etc/default/sogo changed:
PREFORK=10

/etc/sogo/sogo.conf [Errno 13] Permission denied: '/etc/sogo/sogo.conf'

-- no debconf information
Reply | Threaded
Open this post in threaded view
|

Bug#920423: sogo: Exception thrown on "rich" email view after 4.0.5 upgrade (from 3.2.6)

Matthew Hall
No problem!

It seems to actually be a known issue(?) with SOGo upstream, I’ve managed to open a bug report on there own tracker:


Looks like at least one other punter is having the same issue, which I guess makes it reproducible!

Presumably the Debian package will be rebuilt from their sources once they’ve patched it?


On 31 Jan 2019, at 15:06, Jordi Mallach <[hidden email]> wrote:

Hi Matthew, apologies for the late reply,

El dv. 25 de 01 de 2019 a les 10:15 +0000, en/na Matthew Hall va
escriure:
Package: sogo
Version: 4.0.5-2
Severity: grave
Justification: renders package unusable

Dear Maintainer,

I’ve just upgraded (and due to reasons entirely my fault, I’ve
realised I have no downgrade path… backup fail) from 3.2.6 (I believe
it was) to 4.0.5.

It’s a Debian box, using the “official Debian sogo packages” - I’m
now running on Debian Buster (due for release later this year).

Everything is working a charm - upgrading the database appears to
have worked perfectly - all except the “/view” URL used by the AJAX
UI for retrieving a “rich” email from a folder...
(So by extension, I simply cannot view emails in the SOGo webmail
client.)

Interesting. It works for me using an internal backport to stretch.

Have you tried downgrading to 4.0.4? 
https://snapshot.debian.org/archive/debian/20181227T030651Z/pool/main/s/sogo/sogo_4.0.4-2_amd64.deb
and 
https://snapshot.debian.org/archive/debian/20181227T030651Z/pool/main/s/sogo/sogo-common_4.0.4-2_all.deb

Let me know if this version works,
Jordi
-- 
Jordi Mallach Pérez  -- Debian developer  https://www.debian.org/
[hidden email]    [hidden email]  https://www.sindominio.net/
GnuPG public key information available at https://oskuro.net/

Reply | Threaded
Open this post in threaded view
|

Bug#920423: sogo: Exception thrown on "rich" email view after 4.0.5 upgrade (from 3.2.6)

Onur Tolga Sehitoglu
In reply to this post by Matthew Hall
On Fri, 01 Feb 2019 11:36:59 +0100 Jordi Mallach [hidden email] wrote:
> El dj. 31 de 01 de 2019 a les 20:06 +0000, en/na Matthew Hall va
> escriure:
> > No problem!
> >
> > It seems to actually be a known issue(?) with SOGo upstream, I’ve
> > managed to open a bug report on there own tracker:
> >
> > https://sogo.nu/bugs/view.php?id=4659
> >
> > Looks like at least one other punter is having the same issue, which
> > I guess makes it reproducible!
> >
> > Presumably the Debian package will be rebuilt from their sources once
> > they’ve patched it?
>
> Yes, once there's a patch we would include it in our version ASAP.
>
> If you're monitoring the issue, feel free to ping us here if you see a
> fix has landed.
>
> Jordi
> --
> Jordi Mallach Pérez -- Debian developer https://www.debian.org/
> [hidden email] [hidden email] https://www.sindominio.net/
> GnuPG public key information available at https://oskuro.net/
>

I just posted the following on the SOGO bugtracker issue page.
Patched fixed the problem for me:


I figured out the problem. The shouldAskReceipt function in UIxMailView.m
sends a nil email parameter to NGMailAddressParser which calls
[NSString stringWithString] with this parameter. Prior versions of gnustep
tolerated this but not 1.26.

A quick fix is below:

diff -u -r b/SOGo-4.0.5/UI/MailerUI/UIxMailView.m a/SOGo-4.0.5/UI/MailerUI/UIxMailView.m
--- b/SOGo-4.0.5/UI/MailerUI/UIxMailView.m    2019-01-09 18:03:12.000000000 +0300
+++ a/SOGo-4.0.5/UI/MailerUI/UIxMailView.m    2019-02-11 15:25:44.870164041 +0300
@@ -716,14 +716,17 @@
             email = [mailHeaders objectForKey: @"return-receipt-to"];
         }
 
-      // email here can be [hidden email] or "Foo Bar [hidden email]"
-      // we must extract the actual email address
-      mailAddress = [[NGMailAddressParser mailAddressParserWithString: email] parse];
      
-      if ([mailAddress isKindOfClass: [NGMailAddress class]])
-        email = [mailAddress address];
-      else
-        email = nil;
+      if (email)
+    {
+          // email here can be [hidden email] or "Foo Bar [hidden email]"
+          // we must extract the actual email address
+          mailAddress = [[NGMailAddressParser mailAddressParserWithString: email] parse];
+          if ([mailAddress isKindOfClass: [NGMailAddress class]])
+            email = [mailAddress address];
+          else
+            email = nil;
+    }
      
       if (email)
         {



Reply | Threaded
Open this post in threaded view
|

Bug#920423: sogo: Exception thrown on "rich" email view after 4.0.5 upgrade (from 3.2.6)

Jordi Mallach
Hi Onur,

El dl. 11 de 02 de 2019 a les 18:31 +0300, en/na Onur Tolga Sehitoglu
va escriure:
> I just posted the following on the SOGO bugtracker issue page.
> Patched fixed the problem for me:
>
> I figured out the problem. The shouldAskReceipt function in
> UIxMailView.m
> sends a nil email parameter to NGMailAddressParser which calls
> [NSString stringWithString] with this parameter. Prior versions of
> gnustep
> tolerated this but not 1.26.

Thanks for spending some time on this and providing a fix! The patch
looks good, and I have uploaded a new SOGo revision that includes it.

Jordi
--
Jordi Mallach Pérez  -- Debian developer  https://www.debian.org/
[hidden email]    [hidden email]  https://www.sindominio.net/
GnuPG public key information available at https://oskuro.net/

Reply | Threaded
Open this post in threaded view
|

Bug#920423: marked as done (sogo: Exception thrown on "rich" email view after 4.0.5 upgrade (from 3.2.6))

Debian Bug Tracking System
In reply to this post by Matthew Hall
Your message dated Tue, 12 Feb 2019 00:51:43 +0000
with message-id <[hidden email]>
and subject line Bug#920423: fixed in sogo 4.0.5-3
has caused the Debian Bug report #920423,
regarding sogo: Exception thrown on "rich" email view after 4.0.5 upgrade (from 3.2.6)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [hidden email]
immediately.)


--
920423: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=920423
Debian Bug Tracking System
Contact [hidden email] with problems

Package: sogo
Version: 4.0.5-2
Severity: grave
Justification: renders package unusable

Dear Maintainer,

I’ve just upgraded (and due to reasons entirely my fault, I’ve realised I have no downgrade path… backup fail) from 3.2.6 (I believe it was) to 4.0.5.

It’s a Debian box, using the “official Debian sogo packages” - I’m now running on Debian Buster (due for release later this year).

Everything is working a charm - upgrading the database appears to have worked perfectly - all except the “/view” URL used by the AJAX UI for retrieving a “rich” email from a folder...
(So by extension, I simply cannot view emails in the SOGo webmail client.)

Works using “viewsource” (as in, the SOGo 'viewsource' button works - which makes sense because I can see the IMAP debug is working properly on the backend), and the headers download properly etc.  I’m seeing an exception thrown in the logs:


Jan 24 22:41:11 sogod [2864]: <0x0x560efac4c220[NGImap4Client]> TLS started successfully.
Jan 24 22:41:11 sogod [2864]: 10.0.90.34, 10.0.20.10, 10.0.20.11 "GET /SOGo/so/matthewhall/Mail/0/folderINBOX/64252/viewsource HTTP/1.1" 200 1584/0 0.549 4041 60% 0
(worked)


Jan 24 22:41:11 sogod [2864]: <0x0x560efac4cae0[NGImap4Client]> TLS started successfully.
2019-01-24 22:41:12.503 sogod[2864:2864] EXCEPTION: <NSException: 0x560efb64a450> NAME:NSInvalidArgumentException REASON:[NSString+stringWithString:]: NULL string INFO:(null)
Jan 24 22:41:12 sogod [2864]: 10.0.90.34, 10.0.20.10, 10.0.20.11 "GET /SOGo/so/matthewhall/Mail/0/folderINBOX/64252/view HTTP/1.1" 501 0/0 0.550 - - 0
(failed)


(Note it’s a “GET” request and not a “POST” because I’m reproducing it manually, not via the AJAX UI in this example.)

I’ve tried with all the debugging enabled in sogo.conf and I don’t see anything unusual: IMAP works perfectly, then sogod throws the exception above.

Any ideas?  I’ve exhausted all my own - and I can’t see that it’s a known bug (I've also reached out to the SOGo user's mailing list on the off-chance).
I’ve by-hand confirmed the database structure looks correct for a 4.0.5, but I may have overlooked something.  I briefly tried it against a fresh database too, and that behaved the same (again, unless I was overlooking something silly).

I cannot rule out the possibility of user error on my behalf - but I'm 90% confident it's an issue in the 4.0.5-2 package.
(I've not been able to try other 4.0.x debian packages - but can do so if they are available.)

No other obvious issues like missing packages etc.

Very happy to provide any other information like database schemas etc if that would help.


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages sogo depends on:
ii  adduser               3.118
ii  gnustep-base-runtime  1.26.0-2
ii  libc6                 2.28-5
ii  libcurl3-gnutls       7.63.0-1
ii  libgcc1               1:8.2.0-14
ii  libglib2.0-0          2.58.2-3
ii  libgnustep-base1.26   1.26.0-2
ii  libgnutls30           3.6.5-2
ii  liblasso3             2.6.0-2+b2
ii  libmemcached11        1.0.18-4.2
ii  libobjc4              8.2.0-14
ii  libsbjson2.3          2.3.2-4+b1
ii  libsope1              4.0.5-2
ii  lsb-base              10.2018112800
ii  memcached             1.5.6-1
ii  sogo-common           4.0.5-2
ii  systemd               240-4
ii  zip                   3.0-11+b1

sogo recommends no packages.

Versions of packages sogo suggests:
pn  postgresql | default-mysql-server | virtual-mysql-server  <none>

-- Configuration Files:
/etc/cron.d/sogo changed:
* * * * *      sogo /usr/sbin/sogo-ealarms-notify > /dev/null 2>&1

/etc/default/sogo changed:
PREFORK=10

/etc/sogo/sogo.conf [Errno 13] Permission denied: '/etc/sogo/sogo.conf'

-- no debconf information

Source: sogo
Source-Version: 4.0.5-3

We believe that the bug you reported is fixed in the latest version of
sogo, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [hidden email],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jordi Mallach <[hidden email]> (supplier of updated sogo package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [hidden email])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 12 Feb 2019 00:46:53 +0100
Source: sogo
Architecture: source
Version: 4.0.5-3
Distribution: unstable
Urgency: medium
Maintainer: Debian SOGo Maintainers <[hidden email]>
Changed-By: Jordi Mallach <[hidden email]>
Closes: 920423
Changes:
 sogo (4.0.5-3) unstable; urgency=medium
 .
   * Add patch from upstream bugtracker to fix display of mail.
     Many thanks to Onur Tolga Sehitoglu (closes: #920423).
Checksums-Sha1:
 0267aafc378ee6814116eb275468a202fc07bd41 2135 sogo_4.0.5-3.dsc
 eaca448c8928b93bfda1c0c84716f12f77cd63cd 15812 sogo_4.0.5-3.debian.tar.xz
 688c0004e5ca5efb92ba912d3d222f8640e6c214 7204 sogo_4.0.5-3_source.buildinfo
Checksums-Sha256:
 46bc3ef76adda62211269328419ab2daf70dbafb16839f1de7d20af0f8f9a72e 2135 sogo_4.0.5-3.dsc
 838daabf0edd398a207e76f15735361fc4e1bb929a9acdb7883331296091fc8c 15812 sogo_4.0.5-3.debian.tar.xz
 47c4c861c131e9a5b0208630bd4a8f40c37f9b4e79dd255ed533d21a9ce29a14 7204 sogo_4.0.5-3_source.buildinfo
Files:
 8522cc54870bdd20a9a88886a76ecb65 2135 mail optional sogo_4.0.5-3.dsc
 14c828ad8448fdfb56bb79cd86cac8e7 15812 mail optional sogo_4.0.5-3.debian.tar.xz
 74cb3531f9fc63a81c82d77182c7fa8a 7204 mail optional sogo_4.0.5-3_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJFBAEBCgAvFiEE6BdUhsApKYN8KGoWJVAvb8vjywQFAlxiDMMRHGpvcmRpQGRl
Ymlhbi5vcmcACgkQJVAvb8vjywTLGA//bB4mzpThOcx2J9DlqK2J8EimT9eD4sMP
c3lq5VNUTBTnzvN700e7xr7Ad4Nmyxodwux0pnH9t0durR9OOhuCuGCNpuQTLnrc
g4NRg+IxBDRxQXj20DWsxt3dRllB3TVpjWvSJXJngPtiv5mqOTqciPv0UF8csfXC
n9A/osqqODc50fU7W3J1hw8uAs2TWtWmu2dnyzW7JZkcDU0MPg5j5Q3JzbSqr4dT
RZXZIHOYZFdNdJNlFBHgCuZYflGmLdJMN5ah10X800Mmx1+Buv9VVrKK06pp5BpQ
vHQAfHK8MpgzmGy1s5vfCmAaYhMNvK+/v+OVFi7suyz3iv8KzpFvEU7NcwqWo5v0
JVePrWVm5xzosVRCKp8K2Vo4MjMbWeqKZW+pME2ALAEBlY7RauNowUlrzCzK8VBm
RwssCZuJp0VQNu+gHDs/mOJiWbxJNtTzGcekgZhx7a2fxOlzBmF9Ub/s2AW703JL
OczgfOAyTWoukWSno8a7PGxa0lPbZCwD7C6RoNZNOFYbYMKHWMzqopxsOnlrXYm5
1YdK1rynRAY37pH4Iy6oa4oUhI/AshVuC8DvhPSJz54WMZjtHQCPDn1ppG7dW3Lh
GtmP1c3Fnyqd5eXeO6CS9di0kZvS5D5Fiv13CbeIkvDVFtuoiD2j/G07aXM2zZDP
mO1RYv51PIc=
=unaJ
-----END PGP SIGNATURE-----