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

2019-02-11 Thread 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/
jo...@sindominio.netjo...@debian.org  https://www.sindominio.net/
GnuPG public key information available at https://oskuro.net/



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

2019-02-11 Thread Onur Tolga Sehitoglu
On Fri, 01 Feb 2019 11:36:59 +0100 Jordi Mallach  wrote:
> El dj. 31 de 01 de 2019 a les 20:06 +, 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/
> jo...@sindominio.net jo...@debian.org 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.0 +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 "f...@bar.com" or "Foo Bar "
-  // 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 "f...@bar.com" or "Foo Bar "
+  // 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)
 {





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

2019-02-01 Thread Jordi Mallach
El dj. 31 de 01 de 2019 a les 20:06 +, 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/
jo...@sindominio.netjo...@debian.org  https://www.sindominio.net/
GnuPG public key information available at https://oskuro.net/



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

2019-01-31 Thread 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:

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?


> On 31 Jan 2019, at 15:06, Jordi Mallach  wrote:
> 
> Hi Matthew, apologies for the late reply,
> 
> El dv. 25 de 01 de 2019 a les 10:15 +, 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/ 
> 
> jo...@sindominio.net jo...@debian.org 
>   https://www.sindominio.net/ 
> 
> GnuPG public key information available at https://oskuro.net/ 
> 


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

2019-01-31 Thread Jordi Mallach
Hi Matthew, apologies for the late reply,

El dv. 25 de 01 de 2019 a les 10:15 +, 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/
jo...@sindominio.netjo...@debian.org  https://www.sindominio.net/
GnuPG public key information available at https://oskuro.net/



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

2019-01-25 Thread 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:  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  libmemcached111.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  

-- 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