summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@entrouvert.com>2005-03-29 08:16:58 +0000
committerFrederic Peters <fpeters@entrouvert.com>2005-03-29 08:16:58 +0000
commita7a9f57fb48c46ab9fa68eb957428d73f49ad659 (patch)
treeaf33e186298ba8ae1d61c89dcf9457ccbf3f6963
parent892d66e067840cff1563ace8a57ec303caa38adf (diff)
downloadlasso-a7a9f57fb48c46ab9fa68eb957428d73f49ad659.tar.gz
lasso-a7a9f57fb48c46ab9fa68eb957428d73f49ad659.tar.xz
lasso-a7a9f57fb48c46ab9fa68eb957428d73f49ad659.zip
don't add assertion in samlp:Response if the signature check failed
-rw-r--r--lasso/id-ff/login.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lasso/id-ff/login.c b/lasso/id-ff/login.c
index 9b83ac9e..10c37db4 100644
--- a/lasso/id-ff/login.c
+++ b/lasso/id-ff/login.c
@@ -858,7 +858,6 @@ lasso_login_build_response_msg(LassoLogin *login, gchar *remote_providerID)
{
LassoProvider *remote_provider;
LassoProfile *profile;
- LassoSamlAssertion *assertion;
gint ret = 0;
g_return_val_if_fail(LASSO_IS_LOGIN(login), -1);
@@ -891,15 +890,15 @@ lasso_login_build_response_msg(LassoLogin *login, gchar *remote_providerID)
g_free(login->private_data->soap_request_msg);
login->private_data->soap_request_msg = NULL;
- /* changed status code into RequestDenied
- if signature is invalid or not found
- if an error occurs during verification */
+ /* change status code into RequestDenied if signature is
+ * invalid or not found or if an error occurs during
+ * verification */
if (ret != 0) {
lasso_profile_set_response_status(profile,
LASSO_SAML_STATUS_CODE_REQUEST_DENIED);
}
- if (profile->session) {
+ if (profile->session && ret == 0) {
/* get assertion in session and add it in response */
assertion = lasso_session_get_assertion(profile->session,
profile->remote_providerID);