See ChangeLog
Monotone-Parent: 66896b19ddd5c88878bd3dc798a5ac3efee18a48 Monotone-Revision: 392bdd6ba9c324042c23ae3d8e26d2d328da895f Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2011-02-17T20:55:19 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
7e101767f8
commit
4ec6ab9f12
|
@ -3,6 +3,9 @@
|
|||
* Modified all tools to NOT check for SOGoUserSources
|
||||
as it'll break if we are in multi-domain with no
|
||||
master sources defined.
|
||||
* Modified SOGoAuthenticator: -imapPasswordInContext: ...
|
||||
to pass the server URL and not the host particle in order
|
||||
to determine if we are using SSL or not.
|
||||
|
||||
2011-02-15 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
/* MAPIStoreAuthenticator.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2010 Inverse inc.
|
||||
|
@ -26,6 +27,7 @@
|
|||
#import <Foundation/NSObject.h>
|
||||
|
||||
@class NSString;
|
||||
@class NSURL;
|
||||
|
||||
@class WOContext;
|
||||
|
||||
|
@ -41,7 +43,7 @@
|
|||
- (void) setPassword: (NSString *) newPassword;
|
||||
|
||||
- (NSString *) imapPasswordInContext: (WOContext *) context
|
||||
forServer: (NSString *) imapServer
|
||||
forURL: (NSURL *) server
|
||||
forceRenew: (BOOL) renew;
|
||||
|
||||
@end
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
*/
|
||||
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSURL.h>
|
||||
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoPermissions.h>
|
||||
|
@ -58,7 +59,7 @@
|
|||
}
|
||||
|
||||
- (NSString *) imapPasswordInContext: (WOContext *) context
|
||||
forServer: (NSString *) imapServer
|
||||
forURL: (NSURL *) server
|
||||
forceRenew: (BOOL) renew
|
||||
{
|
||||
NSString *imapPassword;
|
||||
|
|
|
@ -645,7 +645,7 @@ static NSString *sieveScriptName = @"sogo";
|
|||
|
||||
password = [[self authenticatorInContext: context]
|
||||
imapPasswordInContext: context
|
||||
forServer: [imapURL host]
|
||||
forURL: imapURL
|
||||
forceRenew: renewed];
|
||||
if (!password)
|
||||
[self errorWithFormat: @"no IMAP4 password available"];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* SOGoAuthenticator.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007-2010 Inverse inc.
|
||||
* Copyright (C) 2007-2011 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
*
|
||||
|
@ -34,7 +34,7 @@
|
|||
- (NSString *) passwordInContext: (WOContext *) context;
|
||||
- (SOGoUser *) userInContext: (WOContext *) context;
|
||||
- (NSString *) imapPasswordInContext: (WOContext *) context
|
||||
forServer: (NSString *) imapServer
|
||||
forURL: (NSURL *) server
|
||||
forceRenew: (BOOL) renew;
|
||||
|
||||
@end
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSURL.h>
|
||||
|
||||
#import <NGObjWeb/WOContext.h>
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
|
@ -102,13 +103,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])
|
||||
{
|
||||
|
@ -117,7 +118,15 @@
|
|||
{
|
||||
session = [SOGoCASSession CASSessionWithTicket: password
|
||||
fromProxy: YES];
|
||||
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];
|
||||
|
|
|
@ -139,7 +139,7 @@
|
|||
}
|
||||
|
||||
- (NSString *) imapPasswordInContext: (WOContext *) context
|
||||
forServer: (NSString *) imapServer
|
||||
forURL: (NSURL *) server
|
||||
forceRenew: (BOOL) renew
|
||||
{
|
||||
return (renew ? nil : [self passwordInContext: context]);
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue