summaryrefslogtreecommitdiff
path: root/rss.c
diff options
context:
space:
mode:
authorGravatar rako2025-11-28 10:37:49 +0100
committerGravatar rako2025-11-30 21:19:13 +0100
commita45c1ce152011e8fe25eb1d25594ac5705f65404 (patch)
tree93c9f3f9dc187fe7aa38e882879f72353b273925 /rss.c
parentMoved is_msg_mine() to data.c. (diff)
downloadsnac2-a45c1ce152011e8fe25eb1d25594ac5705f65404.tar.gz
snac2-a45c1ce152011e8fe25eb1d25594ac5705f65404.tar.xz
snac2-a45c1ce152011e8fe25eb1d25594ac5705f65404.zip
Fix user matching
In order to be a proper prefix, the actor url must end with a '/' otherwise it can match another user that starts with the same prefix: for example 'testuser' will match anything made by 'testuser2'
Diffstat (limited to 'rss.c')
-rw-r--r--rss.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rss.c b/rss.c
index 6e77205..6124e7a 100644
--- a/rss.c
+++ b/rss.c
@@ -59,7 +59,7 @@ xs_str *rss_from_timeline(snac *user, const xs_list *timeline,
59 const char *content = xs_dict_get(msg, "content"); 59 const char *content = xs_dict_get(msg, "content");
60 const char *published = xs_dict_get(msg, "published"); 60 const char *published = xs_dict_get(msg, "published");
61 61
62 if (user && !xs_startswith(id, user->actor)) 62 if (user && !is_msg_mine(user, id))
63 continue; 63 continue;
64 64
65 if (!id || !content || !published) 65 if (!id || !content || !published)