commit 46cfc37
default
·
2023-08-18 16:21:52 +0000 UTC
parent 8b17629
Be more strict when serving note objects.
1 files changed,
+4,
-0
+4,
-0
1@@ -2059,6 +2059,10 @@ int activitypub_get_handler(const xs_dict *req, const char *q_path,
2 xs *id = xs_fmt("%s/%s", snac.actor, p_path);
3
4 status = object_get(id, &msg);
5+
6+ /* don't return non-public objects */
7+ if (valid_status(status) && !is_msg_public(msg))
8+ status = 404;
9 }
10 else
11 status = 404;