summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@entrouvert.com>2006-11-03 09:42:55 +0000
committerFrederic Peters <fpeters@entrouvert.com>2006-11-03 09:42:55 +0000
commitbb60709b78473f5b0b3719d8ac63f4aae01ef493 (patch)
tree057bd77c0ce3eb9ee15fd95ccfccd1330dafc939
parenta86ff714dec0c43c4df001f90d5c3d5daa83defb (diff)
fix saml2 artifact decoding
-rw-r--r--lasso/saml-2.0/profile.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lasso/saml-2.0/profile.c b/lasso/saml-2.0/profile.c
index 1509c6e0..1d9087c0 100644
--- a/lasso/saml-2.0/profile.c
+++ b/lasso/saml-2.0/profile.c
@@ -134,7 +134,7 @@ lasso_saml20_profile_init_artifact_resolve(LassoProfile *profile,
char **query_fields;
char *artifact_b64 = NULL, *provider_succinct_id_b64;
char provider_succinct_id[21];
- char artifact[43];
+ char artifact[45];
LassoSamlp2RequestAbstract *request;
int i;
@@ -156,8 +156,8 @@ lasso_saml20_profile_init_artifact_resolve(LassoProfile *profile,
artifact_b64 = g_strdup(msg);
}
- i = xmlSecBase64Decode((xmlChar*)artifact_b64, (xmlChar*)artifact, 43);
- if (i < 0 || i > 42) {
+ i = xmlSecBase64Decode((xmlChar*)artifact_b64, (xmlChar*)artifact, 45);
+ if (i < 0 || i > 44) {
g_free(artifact_b64);
return LASSO_ERROR_UNDEFINED;
}
@@ -167,7 +167,9 @@ lasso_saml20_profile_init_artifact_resolve(LassoProfile *profile,
return LASSO_ERROR_UNDEFINED;
}
- memcpy(provider_succinct_id, artifact+2, 20);
+ /* XXX: index endpoint */
+
+ memcpy(provider_succinct_id, artifact+4, 20);
provider_succinct_id[20] = 0;
provider_succinct_id_b64 = (char*)xmlSecBase64Encode((xmlChar*)provider_succinct_id, 20, 0);