From 63206b32f27199fd6be41b401dbbc6bcd044e419 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Tue, 12 Jan 2010 15:40:12 +0000 Subject: in saml-2.0/profile.c, in lasso_saml20_build_response_msg, when no url is given, only stop for bindings needing one --- lasso/saml-2.0/profile.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/lasso/saml-2.0/profile.c b/lasso/saml-2.0/profile.c index 7bf91da0..55406b30 100644 --- a/lasso/saml-2.0/profile.c +++ b/lasso/saml-2.0/profile.c @@ -1137,14 +1137,19 @@ lasso_saml20_profile_build_response_msg(LassoProfile *profile, char *service, made_url = url = get_response_url(provider, service, http_method_to_binding(method)); } - switch (method) { - case LASSO_HTTP_METHOD_POST: - case LASSO_HTTP_METHOD_REDIRECT: - case LASSO_HTTP_METHOD_ARTIFACT_GET: - case LASSO_HTTP_METHOD_ARTIFACT_POST: - goto_cleanup_with_rc(critical_error(LASSO_PROFILE_ERROR_UNKNOWN_PROFILE_URL)); - default: - break; + /* only asynchronous bindings needs an URL for the response, SOAP does not need it, and PAOS + * is special (response is a SOAP request !?! ) */ + if (! url) { + switch (method) { + case LASSO_HTTP_METHOD_POST: + case LASSO_HTTP_METHOD_REDIRECT: + case LASSO_HTTP_METHOD_ARTIFACT_GET: + case LASSO_HTTP_METHOD_ARTIFACT_POST: + case LASSO_HTTP_METHOD_PAOS: + goto_cleanup_with_rc(critical_error(LASSO_PROFILE_ERROR_UNKNOWN_PROFILE_URL)); + default: + break; + } } switch (method) { -- cgit