From 6de95e8bd59caea283224155b8f43c5cf06a4417 Mon Sep 17 00:00:00 2001 From: olavmrk Date: Mon, 10 Aug 2009 12:38:08 +0000 Subject: Disable local session when logout starts. Mark the local session as logged out as soon as logout starts, in case the IdP doesn't respond for some reason. git-svn-id: https://modmellon.googlecode.com/svn/trunk@64 a716ebb1-153a-0410-b759-cfb97c6a1b53 --- auth_mellon_handler.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'auth_mellon_handler.c') diff --git a/auth_mellon_handler.c b/auth_mellon_handler.c index 7f7569e..b8bc25c 100644 --- a/auth_mellon_handler.c +++ b/auth_mellon_handler.c @@ -796,6 +796,7 @@ static int am_init_logout_request(request_rec *r, LassoLogout *logout) { char *return_to; int rc; + am_cache_entry_t *mellon_session; gint res; char *redirect_to; LassoProfile *profile; @@ -813,6 +814,13 @@ static int am_init_logout_request(request_rec *r, LassoLogout *logout) return HTTP_BAD_REQUEST; } + /* Disable the the local session (in case the IdP doesn't respond). */ + mellon_session = am_get_request_session(r); + if(mellon_session != NULL) { + mellon_session->logged_in = 0; + am_release_request_session(r, mellon_session); + } + /* Create the logout request message. */ res = lasso_logout_init_request(logout, NULL, LASSO_HTTP_METHOD_REDIRECT); if(res == LASSO_PROFILE_ERROR_SESSION_NOT_FOUND) { -- cgit