View Issue Details

IDProjectCategoryView StatusLast Update
0004566SOGoWeb Mailpublic2018-10-16 15:00
Reporterslainsavage Assigned Toludovic  
PrioritynormalSeverityblockReproducibilityalways
Status resolvedResolutionfixed 
PlatformServerOSarchlinuxOS Versioncurrent
Product Version4.0.2 
Fixed in Version4.0.3 
Summary0004566: After upgrade to 4.0.2, I get "An error occurred during object publishing"
Description

After upgrading to version 4.0.2 I get the following error message in my web browser right after authentication has completed.

An error occurred during object publishing
the requested object could not be found!

In my system logs I see the following error when starting sogo.

sogod[29991]: Error (objc-load):/usr/lib/GNUstep/SOGo/MailPartViewers.SOGo/MailPartViewers: undefined
symbol: SSL_load_error_strings
sogod[29991]: Oct 05 08:16:29 sogod [29991]: [so-product-registry] could not load product: MailPartViewers
sogod[29991]: Error (objc-load):/usr/lib/GNUstep/SOGo/MailerUI.SOGo/MailerUI: undefined symbol: __objc_class_name_UIxMailSizeFormatter
sogod[29991]: Oct 05 08:16:29 sogod [29991]: [so-product-registry] could not load product: MailerUI

Steps To Reproduce

Compile version 4.0.2 from source on archlinux

Additional Information

If I compile version 4.0.1 from source on archlinux then everything works as expected.

I am using the following software versions

kernel: 4.18.10-1
opnessl: 1.1.1-1
gnustep-base: 1.25.1-3

TagsNo tags attached.

Activities

slainsavage

slainsavage

2018-10-09 03:17

reporter   ~0013087

I have managed to get 4.0.2 working by reverting UI/MailPartViewers/UIxMailPartSignedViewer.m back to how it was in 4.0.1

I removed SSL_load_error_strings(); and changed

validationMessage = [[self labelForKey: [NSString stringWithUTF8String: sslError ? sslError : "(no erro r information available)"]] retain];

to

validationMessage = [[self labelForKey: [NSString stringWithUTF8String: sslError]] retain];

This is not a proper solution but hopefully it will help someone to track down the real problem

slainsavage

slainsavage

2018-10-09 03:31

reporter   ~0013088

Some more info that might be helpful

UIxMailPartSignedViewer.m was modified with commit 5a48fca43dc387033f53f6f99ac045eae1cf9604 to resolve 0004433 "(fix) avoid displaying empty signed emails when using GNU TLS"

DJ_L

DJ_L

2018-10-11 00:35

reporter   ~0013093

Last edited: 2018-10-11 01:04

Somebody more capable should double check this, but two patches should be close to correct.

^^ check should actually be: #if OPENSSL_VERSION_NUMBER < 0x10100000L

DJ_L

DJ_L

2018-10-11 00:36

reporter  

SOPE-4.0.2-OpenSSL-1.1_fix-1.patch (784 bytes)   
diff -Naurp SOPE-orig/sope-core/NGStreams/NGActiveSSLSocket.m SOPE/sope-core/NGStreams/NGActiveSSLSocket.m
--- SOPE-orig/sope-core/NGStreams/NGActiveSSLSocket.m	2018-10-10 23:02:55.886959720 -0500
+++ SOPE/sope-core/NGStreams/NGActiveSSLSocket.m	2018-10-10 23:14:00.079065658 -0500
@@ -216,13 +216,15 @@ static BIO_METHOD streamBIO = {
   if ((self = [super initWithDomain:_domain])) {
     //BIO *bio_err;
     static BOOL didGlobalInit = NO;
-    
+
+#if (OPENSSL_VERSION >= 0x01010001f)
     if (!didGlobalInit) {
       /* Global system initialization*/
       SSL_library_init();
       SSL_load_error_strings();
       didGlobalInit = YES;
     }
+#endif /* OPENSSL_VERSION >= 0x01010001f */
 
     /* An error write context */
     //bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
DJ_L

DJ_L

2018-10-11 00:36

reporter  

SOGo-4.0.2-OpenSSL-1.1.0_fixes-1.patch (1,106 bytes)   
diff -Naurp SOGo-4.0.2-orig/UI/MailPartViewers/UIxMailPartSignedViewer.m SOGo-4.0.2/UI/MailPartViewers/UIxMailPartSignedViewer.m
--- SOGo-4.0.2-orig/UI/MailPartViewers/UIxMailPartSignedViewer.m	2018-10-10 23:32:06.753085278 -0500
+++ SOGo-4.0.2/UI/MailPartViewers/UIxMailPartSignedViewer.m	2018-10-10 23:33:04.864737333 -0500
@@ -169,10 +169,20 @@
 
       if (err)
         {
+# ifdef HAVE_GNUTLS
           ERR_load_crypto_strings();
           SSL_load_error_strings();
           sslError = ERR_reason_error_string(err);
           validationMessage = [[self labelForKey: [NSString stringWithUTF8String: sslError ? sslError : "(no error information available)"]] retain];
+#elseif (OPENSSL_VERSION < 0x01010001f)
+          ERR_load_crypto_strings();
+          SSL_load_error_strings();
+          sslError = ERR_reason_error_string(err);
+          validationMessage = [[self labelForKey: [NSString stringWithUTF8String: sslError]] retain];
+# else
+          validationMessage = [[self labelForKey: [NSString stringWithUTF8String: sslError]] retain];
+#endif /* HAVE_GNUTLS */
+
         }
     }
 
slainsavage

slainsavage

2018-10-11 03:38

reporter   ~0013094

Thanks DJ_L,

I have tested the patches on two of my systems and everything is now working.

DJ_L

DJ_L

2018-10-14 01:00

reporter   ~0013104

https://github.com/inverse-inc/sope/pull/46
and
https://github.com/inverse-inc/sogo/pull/243

ludovic

ludovic

2018-10-16 15:00

administrator   ~0013114

PRs were merged.

Issue History

Date Modified Username Field Change
2018-10-05 04:56 slainsavage New Issue
2018-10-09 03:18 slainsavage Note Added: 0013087
2018-10-09 03:31 slainsavage Note Added: 0013088
2018-10-11 00:35 DJ_L Note Added: 0013093
2018-10-11 00:36 DJ_L File Added: SOPE-4.0.2-OpenSSL-1.1_fix-1.patch
2018-10-11 00:36 DJ_L File Added: SOGo-4.0.2-OpenSSL-1.1.0_fixes-1.patch
2018-10-11 01:04 DJ_L Note Edited: 0013093
2018-10-11 03:38 slainsavage Note Added: 0013094
2018-10-14 01:00 DJ_L Note Added: 0013104
2018-10-16 15:00 ludovic Note Added: 0013114
2018-10-16 15:00 ludovic Status new => resolved
2018-10-16 15:00 ludovic Fixed in Version => 4.0.3
2018-10-16 15:00 ludovic Resolution open => fixed
2018-10-16 15:00 ludovic Assigned To => ludovic