commit fbbc4e8

grunfink  ·  2026-05-22 15:05:52 +0000 UTC
parent 4f1687a
Added more logging.
1 files changed,  +6, -2
+6, -2
 1@@ -3885,8 +3885,10 @@ int activitypub_get_handler(const xs_dict *req, const char *q_path,
 2 
 3     xs *l = xs_split_n(q_path, "/", 2);
 4 
 5-    if (xs_list_len(l) <= 1)
 6+    if (xs_list_len(l) <= 1) {
 7+        srv_debug(1, xs_fmt("activitypub_get_handler bad path %s", q_path));
 8         return HTTP_STATUS_BAD_REQUEST;
 9+    }
10 
11     const char *uid;
12     const char *p_path;
13@@ -4075,8 +4077,10 @@ int activitypub_post_handler(const xs_dict *req, const char *q_path,
14     /* get the user and path */
15     xs *l = xs_split_n(q_path, "/", 2);
16 
17-    if (xs_list_len(l) <= 1)
18+    if (xs_list_len(l) <= 1) {
19+        srv_debug(1, xs_fmt("activitypub_post_handler bad path %s", q_path));
20         return HTTP_STATUS_BAD_REQUEST;
21+    }
22 
23     if (xs_list_len(l) == 2 && strcmp(xs_list_get(l, 1), "shared-inbox") == 0) {
24         enqueue_shared_input(msg, req, 0);