mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-09 04:19:43 +00:00
See ChangeLog
Monotone-Parent: f5359c59c0bb008203154487db17e1ecdd274c0d Monotone-Revision: 7c78ba28d583536196a1acf34df5c96f40db238e Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2010-12-28T17:42:50 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoUserDefaults.h>
|
||||
#import <SOGo/SOGoUserFolder.h>
|
||||
#import <SOGo/SOGoSession.h>
|
||||
#import <SOGo/SOGoSystemDefaults.h>
|
||||
#import <SOGo/NSCalendarDate+SOGo.h>
|
||||
#import <SOGo/NSDictionary+Utilities.h>
|
||||
@@ -275,11 +276,13 @@
|
||||
|
||||
- (id <WOActionResults>) logoffAction
|
||||
{
|
||||
SOGoWebAuthenticator *auth;
|
||||
NSString *userName, *value;
|
||||
WOResponse *response;
|
||||
WOCookie *cookie;
|
||||
NSCalendarDate *date;
|
||||
NSString *userName;
|
||||
|
||||
WOCookie *cookie;
|
||||
NSArray *creds;
|
||||
|
||||
userName = [[context activeUser] login];
|
||||
[self logWithFormat: @"user '%@' logged off", userName];
|
||||
|
||||
@@ -288,6 +291,18 @@
|
||||
date = [NSCalendarDate calendarDate];
|
||||
[date setTimeZone: [NSTimeZone timeZoneWithAbbreviation: @"GMT"]];
|
||||
|
||||
// We cleanup the memecached/database session cache. We do this before
|
||||
// invoking _logoutCookieWithDate: in order to obtain its value.
|
||||
auth = [[self clientObject] authenticatorInContext: context];
|
||||
if ([auth respondsToSelector: @selector (cookieNameInContext:)])
|
||||
{
|
||||
value = [[context request] cookieValueForKey: [auth cookieNameInContext: context]];
|
||||
creds = [auth parseCredentials: value];
|
||||
|
||||
if ([creds count] > 1)
|
||||
[SOGoSession deleteValueForSessionKey: [creds objectAtIndex: 1]];
|
||||
}
|
||||
|
||||
cookie = [self _logoutCookieWithDate: date];
|
||||
if (cookie)
|
||||
[response addCookie: cookie];
|
||||
@@ -298,6 +313,7 @@
|
||||
forKey: @"Cache-Control"];
|
||||
[response setHeader: @"no-cache" forKey: @"Pragma"];
|
||||
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user