mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-21 11:25:24 +00:00
Monotone-Parent: 78e8177b7871651ba9b05f971e1b40376fb5e49d
Monotone-Revision: 8e4f10d6d171bd7c241c05d63d20efa7f2a66de4 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-09-11T14:38:43 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -121,7 +121,8 @@ static NSArray *supportedLanguages = nil;
|
||||
oldLocation = [[self clientObject] baseURLInContext: context];
|
||||
response
|
||||
= [self redirectToLocation: [NSString stringWithFormat: @"%@/%@",
|
||||
oldLocation, login]];
|
||||
oldLocation,
|
||||
[login stringByEscapingURL]]];
|
||||
}
|
||||
|
||||
return response;
|
||||
|
||||
@@ -270,7 +270,7 @@ static NSString *LDAPContactInfoAttribute = nil;
|
||||
SOGoWebAuthenticator *auth;
|
||||
id container;
|
||||
NSCalendarDate *date;
|
||||
NSString *userName;
|
||||
NSString *userName, *cookieName;
|
||||
|
||||
container = [[self clientObject] container];
|
||||
|
||||
@@ -281,21 +281,27 @@ static NSString *LDAPContactInfoAttribute = nil;
|
||||
[response setStatus: 302];
|
||||
[response setHeader: [container baseURLInContext: context]
|
||||
forKey: @"location"];
|
||||
auth = [[self clientObject] authenticatorInContext: context];
|
||||
|
||||
date = [NSCalendarDate calendarDate];
|
||||
[date setTimeZone: [NSTimeZone timeZoneWithAbbreviation: @"GMT"]];
|
||||
|
||||
cookie = [WOCookie cookieWithName: [auth cookieNameInContext: context]
|
||||
value: @"discard"];
|
||||
[cookie setPath: @"/"];
|
||||
[cookie setExpires: [date yesterday]];
|
||||
[response addCookie: cookie];
|
||||
auth = [[self clientObject] authenticatorInContext: context];
|
||||
if ([auth respondsToSelector: @selector (cookieNameInContext:)])
|
||||
cookieName = [auth cookieNameInContext: context];
|
||||
else
|
||||
cookieName = nil;
|
||||
if (cookieName)
|
||||
{
|
||||
cookie = [WOCookie cookieWithName: cookieName value: @"discard"];
|
||||
[cookie setPath: @"/"];
|
||||
[cookie setExpires: [date yesterday]];
|
||||
[response addCookie: cookie];
|
||||
}
|
||||
|
||||
[response setHeader: [date rfc822DateString] forKey: @"Last-Modified"];
|
||||
[response setHeader: @"no-store, no-cache, must-revalidate, max-age=0"
|
||||
forKey: @"Cache-Control"];
|
||||
[response setHeader: @"post-check=0, pre-check=0" forKey: @"Cache-Control"];
|
||||
[response setHeader: @"no-store, no-cache, must-revalidate."
|
||||
@" max-age=0, post-check=0, pre-check=0"
|
||||
forKey: @"Cache-Control"];
|
||||
[response setHeader: @"no-cache" forKey: @"Pragma"];
|
||||
|
||||
return response;
|
||||
|
||||
Reference in New Issue
Block a user