From cc535e9958bf8eb267f4f9f8e34cad40a5e6d589 Mon Sep 17 00:00:00 2001 From: default Date: Wed, 10 Jan 2024 19:23:34 +0100 Subject: Added more webfinger checks, just to be sure. --- activitypub.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'activitypub.c') diff --git a/activitypub.c b/activitypub.c index be82fff..7c5a19e 100644 --- a/activitypub.c +++ b/activitypub.c @@ -616,7 +616,7 @@ xs_str *process_tags(snac *snac, const char *content, xs_list **tag) status = webfinger_request(wuid, &actor, &uid); - if (valid_status(status)) { + if (valid_status(status) && actor && uid) { xs *d = xs_dict_new(); xs *n = xs_fmt("@%s", uid); @@ -1207,7 +1207,8 @@ xs_dict *msg_note(snac *snac, const xs_str *content, const xs_val *rcpts, xs *t_href = NULL; xs *t_name = NULL; - if (!xs_is_null(a) && valid_status(webfinger_request(a, &t_href, &t_name))) { + if (!xs_is_null(a) && valid_status(webfinger_request(a, &t_href, &t_name) + && t_href && t_name)) { xs *t = xs_dict_new(); t = xs_dict_append(t, "type", "Mention"); -- cgit v1.2.3