diff --git a/ChangeLog b/ChangeLog index f51218421..a828c7cfa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,12 @@ +2011-12-09 Francis Lachapelle + + * UI/MainUI/SOGoRootPage.m (_cookieWithUsername:): the SOGoLogin + cookie now expires in one month. + 2011-12-09 Wolfgang Sourdeau - * UI/SOGoUI/UIxComponent.m (-isCalendarEnabled) - (-isContactsEnabled, -isMailEnabled, -isPreferencesEnabled): new - accessors. - (-userHasCalendarAccess, -userHasMailAccess): moved from UIxPageFrame. + * UI/SOGoUI/UIxComponent.m (-userHasCalendarAccess) + (-userHasMailAccess): moved from UIxPageFrame. * UI/Common/UIxToolbar.m (-cssClasses): new accessor that generates the CSS classes dynamically depending on the button diff --git a/UI/MainUI/SOGoRootPage.m b/UI/MainUI/SOGoRootPage.m index 21d494186..1d2ed529d 100644 --- a/UI/MainUI/SOGoRootPage.m +++ b/UI/MainUI/SOGoRootPage.m @@ -147,17 +147,23 @@ NSCalendarDate *date; appName = [[context request] applicationName]; + date = [NSCalendarDate calendarDate]; + [date setTimeZone: [NSTimeZone timeZoneWithAbbreviation: @"GMT"]]; if (username) { + // Cookie expires in one month loginCookie = [WOCookie cookieWithName: @"SOGoLogin" - value: [username stringByEncodingBase64]]; + value: [username stringByEncodingBase64] + path: nil + domain: nil + expires: [date dateByAddingYears:0 months:1 days:0 + hours:0 minutes:0 seconds:0] + isSecure: NO]; } else { loginCookie = [WOCookie cookieWithName: @"SOGoLogin" value: nil]; - date = [NSCalendarDate calendarDate]; - [date setTimeZone: [NSTimeZone timeZoneWithAbbreviation: @"GMT"]]; [loginCookie setExpires: [date yesterday]]; }