diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2017-10-12 15:12:42 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2017-10-12 15:12:42 +0200 |
commit | c3075f1807d794ab1fb8af4779a07f3f528ce84e (patch) | |
tree | 283b3a6cf42fa6b28d253891a57db5415ac0b971 /src/identity-provider/plugin_rest_identity_provider.c | |
parent | 2d5d51340c15a78b3acb79314781758fdef61ab0 (diff) |
-fix
Diffstat (limited to 'src/identity-provider/plugin_rest_identity_provider.c')
-rw-r--r-- | src/identity-provider/plugin_rest_identity_provider.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/identity-provider/plugin_rest_identity_provider.c b/src/identity-provider/plugin_rest_identity_provider.c index b6a8f3d36f..f6039722fc 100644 --- a/src/identity-provider/plugin_rest_identity_provider.c +++ b/src/identity-provider/plugin_rest_identity_provider.c @@ -599,7 +599,7 @@ add_attribute_cont (struct GNUNET_REST_RequestHandle *con_handle, attribute = GNUNET_IDENTITY_PROVIDER_attribute_new (name_str, GNUNET_IDENTITY_PROVIDER_AT_STRING, value_str, - strlen (value_str)); + strlen (value_str) + 1); handle->idp = GNUNET_IDENTITY_PROVIDER_connect (cfg); handle->idp_op = GNUNET_IDENTITY_PROVIDER_attribute_store (handle->idp, identity_priv, @@ -624,6 +624,12 @@ attr_collect (void *cls, struct GNUNET_JSONAPI_Resource *json_resource; struct RequestHandle *handle = cls; json_t *value; + + if ((NULL == attr->name) || (NULL == attr->data)) + { + GNUNET_IDENTITY_PROVIDER_get_attributes_next (handle->attr_it); + return; + } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Adding attribute: %s\n", attr->name); |