From 4729c4aef12da46eb1855027ae1fe168d3ab3a69 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 6 Sep 2007 22:19:05 +0000 Subject: [PATCH] Monotone-Parent: d2bd6bcda5a12e544ed133a4000f1101dc14908c Monotone-Revision: 84bc6f895c1a0b4e4455df229813dc1774f0be43 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-09-06T22:19:05 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ UI/MainUI/SOGoUserHomePage.m | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7a44e8763..f585510f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-09-06 Wolfgang Sourdeau + * UI/MainUI/SOGoUserHomePage.m ([SOGoUserHomePage -logoffAction]): + set the value of the cookie to "discard" and set its expiration + date to yesterday. + * SoObjects/SOGo/SOGoWebAuthenticator.m ([SOGoWebAuthenticator -preprocessCredentialsInContext:context]): consider the user anonymous if the cookie value is "discard". diff --git a/UI/MainUI/SOGoUserHomePage.m b/UI/MainUI/SOGoUserHomePage.m index 6f211ce67..910155833 100644 --- a/UI/MainUI/SOGoUserHomePage.m +++ b/UI/MainUI/SOGoUserHomePage.m @@ -203,10 +203,10 @@ static NSString *defaultModule = nil; - (id ) logoffAction { WOResponse *response; - NSEnumerator *cookies; WOCookie *cookie; SOGoWebAuthenticator *auth; id container; + NSCalendarDate *date; container = [[self clientObject] container]; @@ -214,11 +214,12 @@ static NSString *defaultModule = nil; [response setStatus: 302]; [response setHeader: [container baseURLInContext: context] forKey: @"location"]; - cookies = [[response cookies] objectEnumerator]; auth = [[self clientObject] authenticatorInContext: context]; cookie = [WOCookie cookieWithName: [auth cookieNameInContext: context] - value: @"logoff"]; + value: @"discard"]; [cookie setPath: @"/"]; + date = [NSCalendarDate calendarDate]; + [cookie setExpires: [date yesterday]]; [response addCookie: cookie]; return response;