From 90b83874aa8f7d6f9d535cb7516704ca99ec89da Mon Sep 17 00:00:00 2001 From: John Dennis Date: Mon, 14 Sep 2015 17:24:23 -0400 Subject: [PATCH] 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 Reviewed-by: Patrick Uiterwijk --- ipsilon/providers/saml2idp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ipsilon/providers/saml2idp.py b/ipsilon/providers/saml2idp.py index d4f3a31..0404fe8 100644 --- a/ipsilon/providers/saml2idp.py +++ b/ipsilon/providers/saml2idp.py @@ -28,8 +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): -- 2.20.1