2007-09-04 Wolfgang Sourdeau <wsourdeau@inverse.ca>
+ * UI/MainUI/SOGoUserHomePage.m ([SOGoUserHomePage -logoffAction]):
+ set the cookie path to "/".
+
* Main/SOGo.m ([SOGo -authenticatorInContext:_ctx]): choose the
authenticator based on the request handler key. "dav" returns the
SOGoDAVAuthenticator, anything else returns the Web authenticator.
/* authenticator */
-- (id) authenticatorInContext: (id) _ctx
+- (id) authenticatorInContext: (WOContext *) context
{
id authenticator;
NSString *key;
- key = [[_ctx request] requestHandlerKey];
+ key = [[context request] requestHandlerKey];
if ([key isEqualToString: @"dav"])
authenticator = [SOGoDAVAuthenticator sharedSOGoDAVAuthenticator];
else
return user;
}
-// - (BOOL) renderException: (NSException *) exception
-// inContext: (WOContext *) context
-// {
-// id renderedException;
-// WOComponent *tmpComponent;
-// WOResponse *response;
-// BOOL rc;
-
-// rc = [super renderException: exception inContext: context];
-// if (!rc)
-// {
-// tmpComponent = [WOComponent new];
-// renderedException = [tmpComponent pageWithName: @"UIxException"];
-// if (renderedException)
-// {
-// rc = YES;
-// response = [context response];
-// [response setHeader: @"text/html" forKey: @"content-type"];
-// [renderedException setClientObject: exception];
-// [context setPage: renderedException];
-// [renderedException appendToResponse: response
-// inContext: context];
-// }
-// [tmpComponent release];
-// }
-
-// return rc;
-// }
-
@end /* SOGoDAVAuthenticator */
id page;
page = [[WOApplication application] pageWithName: @"SOGoRootPage"
- inContext: context];
+ forRequest: [context request]];
[page appendToResponse: response inContext: context];
}
-// - (BOOL) renderException: (NSException *) exception
-// inContext: (WOContext *) context
-// {
-// id renderedException;
-// WOComponent *tmpComponent;
-// WOResponse *response;
-// BOOL rc;
-
-// rc = [super renderException: exception inContext: context];
-// if (!rc)
-// {
-// tmpComponent = [WOComponent new];
-// renderedException = [tmpComponent pageWithName: @"UIxException"];
-// if (renderedException)
-// {
-// rc = YES;
-// response = [context response];
-// [response setHeader: @"text/html" forKey: @"content-type"];
-// [renderedException setClientObject: exception];
-// [context setPage: renderedException];
-// [renderedException appendToResponse: response
-// inContext: context];
-// }
-// [tmpComponent release];
-// }
-
-// return rc;
-// }
-
@end /* SOGoWebAuthenticator */
auth = [[self clientObject] authenticatorInContext: context];
cookie = [WOCookie cookieWithName: [auth cookieNameInContext: context]
value: @"logoff"];
+ [cookie setPath: @"/"];
[response addCookie: cookie];
return response;
<body class="loginPage">
<script type="text/javascript">
var ResourcesURL = '/SOGo.woa/WebServerResources';
+ var ApplicationBaseURL = '<var:string value="applicationPath" />';
</script>
<script type="text/javascript" rsrc:src="_IEtoW3C.js"><!-- space required --></script>
startAnimation($("loginButton"), $("submit"));
var loginString = $("userName").value + ":" + $("password").value;
- document.cookie = "0xHIGHFLYxSOGo-0.9 = basic" + loginString.base64encode();
+ document.cookie = ("0xHIGHFLYxSOGo-0.9 = basic" + loginString.base64encode()
+ + "; path=/");
}
addEvent(window, 'load', initLogin);