See ChangeLog

Monotone-Parent: 66896b19ddd5c88878bd3dc798a5ac3efee18a48
Monotone-Revision: 392bdd6ba9c324042c23ae3d8e26d2d328da895f

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2011-02-17T20:55:19
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Ludovic Marcotte
2011-02-17 20:55:19 +00:00
parent 7e101767f8
commit 4ec6ab9f12
8 changed files with 40 additions and 16 deletions
+14 -5
View File
@@ -23,6 +23,7 @@
#import <Foundation/NSArray.h>
#import <Foundation/NSCalendarDate.h>
#import <Foundation/NSString.h>
#import <Foundation/NSURL.h>
#import <NGObjWeb/SoDefaultRenderer.h>
#import <NGObjWeb/WOApplication.h>
@@ -209,13 +210,13 @@
- (NSString *) imapPasswordInContext: (WOContext *) context
forServer: (NSString *) imapServer
forURL: (NSURL *) server
forceRenew: (BOOL) renew
{
SOGoSystemDefaults *sd;
NSString *password, *service, *scheme;
SOGoCASSession *session;
NSString *password, *service;
SOGoSystemDefaults *sd;
password = [self passwordInContext: context];
if ([password length])
{
@@ -224,7 +225,15 @@
{
session = [SOGoCASSession CASSessionWithIdentifier: password
fromProxy: NO];
service = [NSString stringWithFormat: @"imap://%@", imapServer];
// We must NOT assume the scheme exists
scheme = [server scheme];
if (!scheme)
scheme = @"imap";
service = [NSString stringWithFormat: @"%@://%@", scheme, [server host]];
if (renew)
[session invalidateTicketForService: service];
password = [session ticketForService: service];