summaryrefslogtreecommitdiffstats
path: root/lasso/xml/lib_logout_request.c
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@entrouvert.com>2004-11-22 13:13:16 +0000
committerFrederic Peters <fpeters@entrouvert.com>2004-11-22 13:13:16 +0000
commit476ec0350cf80db0fea3cda9d6a9bca2957d2a8a (patch)
tree61d41052945c59dd7c86172e31510b7ef8f6e9fe /lasso/xml/lib_logout_request.c
parentc8505e458db838a73b96fa9194c63618323119af (diff)
added error checking on query strings; python tests should now pass
Diffstat (limited to 'lasso/xml/lib_logout_request.c')
-rw-r--r--lasso/xml/lib_logout_request.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/lasso/xml/lib_logout_request.c b/lasso/xml/lib_logout_request.c
index 26fa1705..c0010aff 100644
--- a/lasso/xml/lib_logout_request.c
+++ b/lasso/xml/lib_logout_request.c
@@ -126,7 +126,7 @@ build_query(LassoNode *node)
return str;
}
-static void
+static gboolean
init_from_query(LassoNode *node, char **query_fields)
{
LassoLibLogoutRequest *request = LASSO_LIB_LOGOUT_REQUEST(node);
@@ -165,7 +165,16 @@ init_from_query(LassoNode *node, char **query_fields)
continue;
}
}
- parent_class->init_from_query(node, query_fields);
+ if (request->ProviderID == NULL ||
+ request->NameIdentifier->content == NULL ||
+ request->NameIdentifier->Format == NULL ||
+ request->NameIdentifier->NameQualifier == NULL) {
+ lasso_node_destroy(LASSO_NODE(request->NameIdentifier));
+ request->NameIdentifier = NULL;
+ return FALSE;
+ }
+
+ return parent_class->init_from_query(node, query_fields);
}
static int