mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-22 11:55:24 +00:00
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:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user