diff options
| author | Frederic Peters <fpeters@entrouvert.com> | 2005-02-02 00:08:16 +0000 |
|---|---|---|
| committer | Frederic Peters <fpeters@entrouvert.com> | 2005-02-02 00:08:16 +0000 |
| commit | 2ae6eb5da08e39c88dc3f11ad9dbe4ac2212f130 (patch) | |
| tree | 4980d282fadd13408546ac657a0fae529e0edf13 | |
| parent | 75732c8294328c1fcd75e94a84e81b3296c837db (diff) | |
| download | lasso-2ae6eb5da08e39c88dc3f11ad9dbe4ac2212f130.tar.gz lasso-2ae6eb5da08e39c88dc3f11ad9dbe4ac2212f130.tar.xz lasso-2ae6eb5da08e39c88dc3f11ad9dbe4ac2212f130.zip | |
correctly deals with RequestAuthnContext when rebuilding AuthnRequest from
query string
| -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; |
