diff options
| author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2009-03-09 10:24:41 +0000 |
|---|---|---|
| committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2009-03-09 10:24:41 +0000 |
| commit | cf50ac6da229df840409217ece42119a0292d1ba (patch) | |
| tree | 4466a502668bdb7acfa19c366711eebef539f7e7 | |
| parent | f64f9973a551f3e29f367f633078ab0c467045f6 (diff) | |
| download | lasso-cf50ac6da229df840409217ece42119a0292d1ba.tar.gz lasso-cf50ac6da229df840409217ece42119a0292d1ba.tar.xz lasso-cf50ac6da229df840409217ece42119a0292d1ba.zip | |
XML SAML 1.0: fix bug 85
* lasso/xml/lib_logout_request.c: do not break parsing when
NameIdentifier->Format attribute is NULL.
| -rw-r--r-- | lasso/xml/lib_logout_request.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lasso/xml/lib_logout_request.c b/lasso/xml/lib_logout_request.c index f4ea6239..d4d2d290 100644 --- a/lasso/xml/lib_logout_request.c +++ b/lasso/xml/lib_logout_request.c @@ -24,6 +24,7 @@ #include <libxml/uri.h> #include <lasso/xml/lib_logout_request.h> +#include "../utils.h" /** * SECTION:lib_logout_request @@ -104,13 +105,18 @@ init_from_query(LassoNode *node, char **query_fields) lasso_node_init_from_query_fields(node, query_fields); if (request->ProviderID == NULL || - request->NameIdentifier->content == NULL || - request->NameIdentifier->Format == NULL) { - lasso_node_destroy(LASSO_NODE(request->NameIdentifier)); - request->NameIdentifier = NULL; + request->NameIdentifier == NULL || + request->NameIdentifier->content == NULL) { + lasso_release_gobject(request->NameIdentifier); return FALSE; } + if (request->NameIdentifier->Format == NULL) { + lasso_assign_string(request->NameIdentifier->Format, + "LASSO_SAML2_NAME_IDENTIFIER_FORMAT_UNSPECIFIED"); + + } + return TRUE; } |
