aboutsummaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authorgrunfink <grunfink@comam.es>2026-04-05 18:19:21 +0200
committergrunfink <grunfink@comam.es>2026-04-05 18:19:21 +0200
commit7b90bcd03e8259833b8ff3e6d583ad75099fd2c2 (patch)
treec0ed54416be339f25e73c0900bdcf1c2b78f7712 /utils.c
parentcf8f02765a769c27b41efcf479544d41e019036e (diff)
Avoid exporting NULL accounts.
When they are failures of webfinger_request_fake().
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/utils.c b/utils.c
index cb61989..3f9d667 100644
--- a/utils.c
+++ b/utils.c
@@ -678,7 +678,9 @@ void export_csv(snac *user)
xs *uid = NULL;
webfinger_request_fake(actor, NULL, &uid);
- fprintf(f, "%s\n", uid);
+
+ if (xs_is_string(uid))
+ fprintf(f, "%s\n", uid);
}
fclose(f);
@@ -709,7 +711,9 @@ void export_csv(snac *user)
xs *uid = NULL;
webfinger_request_fake(id, NULL, &uid);
- fprintf(f, "%s,%s\n", ltitle, uid);
+
+ if (xs_is_string(uid))
+ fprintf(f, "%s,%s\n", ltitle, uid);
}
}
}
@@ -733,7 +737,9 @@ void export_csv(snac *user)
xs *uid = NULL;
webfinger_request_fake(actor, NULL, &uid);
- fprintf(f, "%s,%s,false,\n", uid, limited(user, actor, 0) ? "false" : "true");
+
+ if (xs_is_string(uid))
+ fprintf(f, "%s,%s,false,\n", uid, limited(user, actor, 0) ? "false" : "true");
}
fclose(f);