diff options
| author | 2023-08-18 18:21:52 +0200 | |
|---|---|---|
| committer | 2023-08-18 18:21:52 +0200 | |
| commit | 46cfc37f2bfe03baa4d6feadf7155483c8797459 (patch) | |
| tree | f2e507d0a26cc5ec5786a2ffdf083a2eaff54a13 | |
| parent | Simplified smiley processing. (diff) | |
| download | snac2-46cfc37f2bfe03baa4d6feadf7155483c8797459.tar.gz snac2-46cfc37f2bfe03baa4d6feadf7155483c8797459.tar.xz snac2-46cfc37f2bfe03baa4d6feadf7155483c8797459.zip | |
Be more strict when serving note objects.
| -rw-r--r-- | activitypub.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activitypub.c b/activitypub.c index d4944ec..a48749d 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -2059,6 +2059,10 @@ int activitypub_get_handler(const xs_dict *req, const char *q_path, | |||
| 2059 | xs *id = xs_fmt("%s/%s", snac.actor, p_path); | 2059 | xs *id = xs_fmt("%s/%s", snac.actor, p_path); |
| 2060 | 2060 | ||
| 2061 | status = object_get(id, &msg); | 2061 | status = object_get(id, &msg); |
| 2062 | |||
| 2063 | /* don't return non-public objects */ | ||
| 2064 | if (valid_status(status) && !is_msg_public(msg)) | ||
| 2065 | status = 404; | ||
| 2062 | } | 2066 | } |
| 2063 | else | 2067 | else |
| 2064 | status = 404; | 2068 | status = 404; |