From a5c9c5572e4ccbac261331658722f0ec7ee34331 Mon Sep 17 00:00:00 2001 From: Thijs Kinkhorst Date: Sun, 14 Jan 2024 15:04:04 +0000 Subject: [PATCH] Remove Lasso < 2.3 compatibility code. Since our minimum ersion is 2.4, this is essentially dead code. It was missed in the earlier cleanups because other compatibility code used ifdefs instead of this construct. --- auth_mellon_handler.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/auth_mellon_handler.c b/auth_mellon_handler.c index e4cefd6..99a013c 100644 --- a/auth_mellon_handler.c +++ b/auth_mellon_handler.c @@ -1182,45 +1182,6 @@ static int am_init_logout_request(request_rec *r, LassoLogout *logout) profile = LASSO_PROFILE(logout); - /* We need to set the SessionIndex in the LogoutRequest to the SessionIndex - * we received during the login operation. This is not needed since release - * 2.3.0. - */ - if (lasso_check_version(2, 3, 0, LASSO_CHECK_VERSION_NUMERIC) == 0) { - session = lasso_profile_get_session(profile); - assertion_list = lasso_session_get_assertions( - session, profile->remote_providerID); - if(! assertion_list || - LASSO_IS_SAML2_ASSERTION(assertion_list->data) == FALSE) { - AM_LOG_RERROR(APLOG_MARK, APLOG_ERR, 0, r, - "No assertions found for the current session."); - lasso_logout_destroy(logout); - return HTTP_INTERNAL_SERVER_ERROR; - } - /* We currently only look at the first assertion in the list - * lasso_session_get_assertions returns. - */ - assertion_n = assertion_list->data; - - assertion = LASSO_SAML2_ASSERTION(assertion_n); - - /* We assume that the first authnStatement contains the data we want. */ - authnStatement = LASSO_SAML2_AUTHN_STATEMENT(assertion->AuthnStatement->data); - - if(!authnStatement) { - AM_LOG_RERROR(APLOG_MARK, APLOG_ERR, 0, r, - "No AuthnStatement found in the current assertion."); - lasso_logout_destroy(logout); - return HTTP_INTERNAL_SERVER_ERROR; - } - - if(authnStatement->SessionIndex) { - request = LASSO_SAMLP2_LOGOUT_REQUEST(profile->request); - request->SessionIndex = g_strdup(authnStatement->SessionIndex); - } - } - - /* Set the RelayState parameter to the return url (if we have one). */ if(return_to) { profile->msg_relayState = g_strdup(return_to);