aboutsummaryrefslogtreecommitdiff
path: root/webfinger.c
diff options
context:
space:
mode:
Diffstat (limited to 'webfinger.c')
-rw-r--r--webfinger.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/webfinger.c b/webfinger.c
index 893d777..85123bc 100644
--- a/webfinger.c
+++ b/webfinger.c
@@ -82,7 +82,11 @@ int webfinger_request_signed(snac *snac, const char *qs, xs_str **actor, xs_str
if (obj == NULL && valid_status(status) && payload) {
obj = xs_json_loads(payload);
- object_add(cached_qs, obj);
+
+ if (obj)
+ object_add(cached_qs, obj);
+ else
+ status = HTTP_STATUS_BAD_REQUEST;
}
if (obj) {