From 3d9ac737bf341e342a7c6a5ac1f122259e734521 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 2 Sep 2010 12:31:32 +0000 Subject: [PATCH 1/3] Monotone-Parent: e36d8d24bc74c3d965cac3d3370bd3d5681f3ffc Monotone-Revision: b9a09b9bf8fc46e61ede310c9787e2c7118175cd Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-09-02T12:31:32 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 7 +++++++ UI/WebServerResources/UIxMailEditor.js | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2ae09f965..eef7f1fe2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-09-02 Wolfgang Sourdeau + + * UI/WebServerResources/UIxMailEditor.js: + (onMenuCheckReturnReceipt): the function has an event parameter + which we need. This fixes an exception occurring when clicking the + "Options" menu. + 2010-09-01 Wolfgang Sourdeau * Tests/Unit/SOGoTest.m (-run): fixed build on GNUstep >= 1.20. diff --git a/UI/WebServerResources/UIxMailEditor.js b/UI/WebServerResources/UIxMailEditor.js index ef971add9..4873546d9 100644 --- a/UI/WebServerResources/UIxMailEditor.js +++ b/UI/WebServerResources/UIxMailEditor.js @@ -450,7 +450,7 @@ function initializePriorityMenu() { $(chosenNode).addClassName("_chosen"); } -function onMenuCheckReturnReceipt() { +function onMenuCheckReturnReceipt(event) { event.cancelBubble = true; this.enabled = !this.enabled; From 0b57a9d8e0a25d2a4cfa602093fac1406317f883 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 2 Sep 2010 16:39:31 +0000 Subject: [PATCH 2/3] Monotone-Parent: 85562e3494ccd15c1f10a3a0bbdfeb11ff54430d Monotone-Revision: 94879e006105e5001a0e4598b69f35c8117ab394 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-09-02T16:39:31 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 3 +++ UI/MailerUI/UIxMailView.m | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index eef7f1fe2..3871e10f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-09-02 Wolfgang Sourdeau + * UI/MailerUI/UIxMailView.m (_receiptMessageHeaderTo:): properly + escape the message subject in QP when needed. + * UI/WebServerResources/UIxMailEditor.js: (onMenuCheckReturnReceipt): the function has an event parameter which we need. This fixes an exception occurring when clicking the diff --git a/UI/MailerUI/UIxMailView.m b/UI/MailerUI/UIxMailView.m index 7d812270d..e49fee405 100644 --- a/UI/MailerUI/UIxMailView.m +++ b/UI/MailerUI/UIxMailView.m @@ -447,7 +447,8 @@ static NSString *mailETag = nil; subject = [NSString stringWithFormat: [self labelForKey: @"Return Receipt (displayed) - %@"], [self messageSubject]]; - [map setObject: subject forKey: @"subject"]; + [map setObject: [subject asQPSubjectString: @"utf-8"] + forKey: @"subject"]; return map; } From eb506c6b0df1aac3e02522b962075a46fa4e0336 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Thu, 2 Sep 2010 16:47:06 +0000 Subject: [PATCH 3/3] Fixed the handling of TLS/SSL sockets Monotone-Parent: 94879e006105e5001a0e4598b69f35c8117ab394 Monotone-Revision: 1f953cea64fc6c840758f4cc35550f91b6aa07af Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2010-09-02T16:47:06 Monotone-Branch: ca.inverse.sogo --- SoObjects/Mailer/SOGoMailAccount.m | 18 ++++++++---------- SoObjects/Mailer/SOGoMailBaseObject.m | 2 +- SoObjects/SOGo/SOGoUser.m | 17 ++++++----------- UI/PreferencesUI/UIxPreferences.h | 2 +- 4 files changed, 16 insertions(+), 23 deletions(-) diff --git a/SoObjects/Mailer/SOGoMailAccount.m b/SoObjects/Mailer/SOGoMailAccount.m index f956c5bd7..08ef11d39 100644 --- a/SoObjects/Mailer/SOGoMailAccount.m +++ b/SoObjects/Mailer/SOGoMailAccount.m @@ -521,16 +521,13 @@ static NSString *sieveScriptName = @"sogo"; mailAccount = [self _mailAccount]; encryption = [mailAccount objectForKey: @"encryption"]; - defaultPort = [[mailAccount objectForKey: @"port"] intValue]; + defaultPort = 143; + protocol = @"imaps"; - if (!defaultPort) - defaultPort = 143; - - if ([encryption isEqualToString: @"ssl"] || - [encryption isEqualToString: @"tls"]) - protocol = @"imaps"; - else - protocol = @"imap"; + if ([encryption isEqualToString: @"ssl"]) + defaultPort = 993; + else if (![encryption isEqualToString: @"tls"]) + protocol = @"imap"; username = [mailAccount objectForKey: @"userName"]; escUsername @@ -542,8 +539,9 @@ static NSString *sieveScriptName = @"sogo"; port = [[mailAccount objectForKey: @"port"] intValue]; if (port && port != defaultPort) [imap4URLString appendFormat: @":%d", port]; + [imap4URLString appendString: @"/"]; - + return imap4URLString; } diff --git a/SoObjects/Mailer/SOGoMailBaseObject.m b/SoObjects/Mailer/SOGoMailBaseObject.m index be239344a..a0ebd65c9 100644 --- a/SoObjects/Mailer/SOGoMailBaseObject.m +++ b/SoObjects/Mailer/SOGoMailBaseObject.m @@ -198,7 +198,7 @@ static BOOL debugOn = YES; urlString = [NSString stringWithFormat: @"%@?tls=YES", [self imap4URLString]]; else - urlString = [self imap4URLString]; + urlString = [self imap4URLString]; imap4URL = [[NSURL alloc] initWithString: urlString]; } diff --git a/SoObjects/SOGo/SOGoUser.m b/SoObjects/SOGo/SOGoUser.m index 1485ab28e..cc903dd05 100644 --- a/SoObjects/SOGo/SOGoUser.m +++ b/SoObjects/SOGo/SOGoUser.m @@ -534,22 +534,17 @@ port = [url port]; encryption = @"none"; - port = @"143"; if ([url query] && [[url query] caseInsensitiveCompare: @"tls=YES"] == NSOrderedSame) encryption = @"tls"; - if ([port intValue] == 0) + if ([scheme caseInsensitiveCompare: @"imaps"] == NSOrderedSame && + ![encryption isEqualToString: @"tls"]) { - if (scheme) - { - if ([scheme caseInsensitiveCompare: @"imaps"] == NSOrderedSame && - ![encryption isEqualToString: @"tls"]) - { - encryption = @"ssl"; - port = @"993"; - } - } + encryption = @"ssl"; + + if ([port intValue] == 0) + port = @"993"; } if ([url host]) diff --git a/UI/PreferencesUI/UIxPreferences.h b/UI/PreferencesUI/UIxPreferences.h index 1ef64f6c0..a724635e2 100644 --- a/UI/PreferencesUI/UIxPreferences.h +++ b/UI/PreferencesUI/UIxPreferences.h @@ -1,6 +1,6 @@ /* UIxPreferences.h - this file is part of SOGo * - * Copyright (C) 2007 Inverse inc. + * Copyright (C) 2007-2010 Inverse inc. * * Author: Wolfgang Sourdeau *