From 836b66358dac3abdf5e81b441db1bf40055ac57b Mon Sep 17 00:00:00 2001 From: default Date: Wed, 18 Sep 2024 20:05:22 +0200 Subject: Use webfinger_request_fake() in export_csv(). --- webfinger.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'webfinger.c') diff --git a/webfinger.c b/webfinger.c index bd7f946..037aefa 100644 --- a/webfinger.c +++ b/webfinger.c @@ -133,9 +133,11 @@ int webfinger_request_fake(const char *qs, xs_str **actor, xs_str **user) if (xs_startswith(qs, "https:/") || xs_startswith(qs, "http:/")) { xs *l = xs_split(qs, "/"); - /* i'll end up in hell for this */ - *user = xs_fmt("%s@%s", xs_list_get(l, 2), xs_list_get(l, -1)); - status = HTTP_STATUS_RESET_CONTENT; + if (xs_list_len(l) > 3) { + /* i'll end up in hell for this */ + *user = xs_fmt("%s@%s", xs_list_get(l, -1), xs_list_get(l, 2)); + status = HTTP_STATUS_RESET_CONTENT; + } } } -- cgit v1.2.3