diff options
| -rw-r--r-- | lasso/xml/lib_authn_request.c | 8 | ||||
| -rw-r--r-- | lasso/xml/xml.c | 6 |
2 files changed, 11 insertions, 3 deletions
diff --git a/lasso/xml/lib_authn_request.c b/lasso/xml/lib_authn_request.c index 7562e666..7365bf64 100644 --- a/lasso/xml/lib_authn_request.c +++ b/lasso/xml/lib_authn_request.c @@ -141,8 +141,16 @@ init_from_query(LassoNode *node, char **query_fields) { LassoLibAuthnRequest *request = LASSO_LIB_AUTHN_REQUEST(node); + request->RequestAuthnContext = LASSO_LIB_REQUEST_AUTHN_CONTEXT( + lasso_lib_request_authn_context_new()); /* XXX needs code for Scoping, IDPList, IDPEntries... */ lasso_node_init_from_query_fields(node, query_fields); + if (request->RequestAuthnContext->AuthnContextClassRef == NULL && + request->RequestAuthnContext->AuthnContextStatementRef == NULL && + request->RequestAuthnContext->AuthnContextComparison == NULL) { + lasso_node_destroy(LASSO_NODE(request->RequestAuthnContext)); + request->RequestAuthnContext = NULL; + } if (request->ProviderID == NULL) return FALSE; diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c index b83bea95..3b29fa28 100644 --- a/lasso/xml/xml.c +++ b/lasso/xml/xml.c @@ -1217,10 +1217,10 @@ set_value_at_path(LassoNode *node, char *path, char *query_value) LASSO_NODE_GET_CLASS(v)->init_from_query(v, &query_value); } else if (snippet->type == SNIPPET_LIST_CONTENT) { char **elems = g_strsplit(query_value, " ", 0); - char *p; + int i; GList *l = NULL; - for (p = elems[0]; p; p++) { - l = g_list_append(l, p); + for (i = 0; elems[i]; i++) { + l = g_list_append(l, g_strdup(elems[i])); } g_strfreev(elems); (*(GList**)value) = l; |
