From bde5748a6e52e6f124e708a64e95827d87c8850c Mon Sep 17 00:00:00 2001 From: default Date: Thu, 19 Dec 2024 05:37:27 +0100 Subject: [PATCH] Minor webfinger tweak. --- webfinger.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) {