From c1d48a277ca1fb0a861df2db3e7fd67a2f4889f4 Mon Sep 17 00:00:00 2001 From: John Dennis Date: Sep 14 2015 21:24:23 +0000 Subject: Modify is_lasso_ecp_enabled() to test for library symbol The function is_lasso_ecp_enabled() in saml2idp.py was testing for a specific lasso version. That has proved problematic because we've had too many "unofficial" versions floating around and sometimes the version check produces the wrong result. A better test is to test for the presence of a symbol in the lasso library we know will only be there with full ECP support. Now we test for the presence of ECP_ERROR_MISSING_AUTHN_REQUEST. Ticket: 167 Signed-off-by: John Dennis --- diff --git a/ipsilon/providers/saml2idp.py b/ipsilon/providers/saml2idp.py index d4f3a31..d64e582 100644 --- a/ipsilon/providers/saml2idp.py +++ b/ipsilon/providers/saml2idp.py @@ -28,9 +28,8 @@ cherrypy.tools.require_content_type = cherrypy.Tool('before_request_body', def is_lasso_ecp_enabled(): - # Full ECP support appeared in lasso version 2.4.2 - return lasso.checkVersion(2, 4, 2, lasso.CHECK_VERSION_NUMERIC) - + # Look for an exported symbol we know was added with ECP support + return 'ECP_ERROR_MISSING_AUTHN_REQUEST' in dir(lasso) class SSO_SOAP(AuthenticateRequest):