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;