diff --git a/Documentation/SOGoInstallationGuide.asciidoc b/Documentation/SOGoInstallationGuide.asciidoc index e8aad6b1d..0e91926b0 100644 --- a/Documentation/SOGoInstallationGuide.asciidoc +++ b/Documentation/SOGoInstallationGuide.asciidoc @@ -1186,8 +1186,8 @@ Defaults to `NO` when unset. (with read-only access). Note that if set to `NO`, autocompletion will not work for entries in this source and thus, freebusy lookups. -!displayName (optional) -!If set as an address book, the human identification name of the LDAP +|displayName (optional) +|If set as an address book, the human identification name of the LDAP repository |listRequiresDot (optional) diff --git a/SoObjects/SOGo/NSString+Crypto.m b/SoObjects/SOGo/NSString+Crypto.m index b7c9a95d9..e404efc48 100644 --- a/SoObjects/SOGo/NSString+Crypto.m +++ b/SoObjects/SOGo/NSString+Crypto.m @@ -511,7 +511,6 @@ static const NSString *kAES256GCMError = @"kAES256GCMError"; // Clean up free(plaintext); - return value; #else @@ -653,7 +652,7 @@ static const NSString *kAES256GCMError = @"kAES256GCMError"; int status = 0; EVP_DecryptUpdate(ctx, plaintext, &p_len, [data bytes], [data length]); - outputData = [NSData dataWithBytes: plaintext length: p_len]; + outputData = [NSData dataWithBytes: (char *)plaintext length: p_len]; EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, GMC_TAG_LEN, (void *)[tagData bytes]); rv = EVP_DecryptFinal_ex(ctx, plaintext + p_len, &f_len); p_len += f_len; @@ -672,7 +671,14 @@ static const NSString *kAES256GCMError = @"kAES256GCMError"; // Clean up free(plaintext); - return value; + if(value) + return value; + else + { + *ex = [NSException exceptionWithName: kAES128ECError reason:@"Could decrypt but value is null" userInfo: nil]; + return nil; + } + #else *ex = [NSException exceptionWithName:kAES256GCMError reason:@"Missing OpenSSL framework" userInfo: nil]; diff --git a/SoObjects/SOGo/SOGoUser.m b/SoObjects/SOGo/SOGoUser.m index 664b53b1b..7d217b28f 100644 --- a/SoObjects/SOGo/SOGoUser.m +++ b/SoObjects/SOGo/SOGoUser.m @@ -1079,6 +1079,8 @@ static const NSString *kEncryptedUserNamePrefix = @"uenc"; if(exception) [self errorWithFormat:@"Can't decrypt the password for auxiliary account %@: %@", [account objectForKey: @"name"], [exception reason]]; + else if(!password) + [self errorWithFormat:@"No exception but decyrpted password is empty for account %@",[account objectForKey: @"name"]]; else [account setObject: password forKey: @"password"]; } diff --git a/UI/PreferencesUI/UIxPreferences.m b/UI/PreferencesUI/UIxPreferences.m index 0011fdf84..8f7d7b247 100644 --- a/UI/PreferencesUI/UIxPreferences.m +++ b/UI/PreferencesUI/UIxPreferences.m @@ -1624,6 +1624,8 @@ static NSArray *reminderValues = nil; [oldAccount objectForKey: @"name"], [exception reason]]; decryptedPassword = @""; } + else if(!decryptedPassword) + [self errorWithFormat:@"No exception but decrypted password is empty for account %@",[oldAccount objectForKey: @"name"]]; else password = decryptedPassword; NS_HANDLER