summaryrefslogtreecommitdiff
path: root/upgrade.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 /upgrade.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 'upgrade.c')
-rw-r--r--upgrade.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/upgrade.c b/upgrade.c
index 87ddfc8..9e0ae6e 100644
--- a/upgrade.c
+++ b/upgrade.c
@@ -213,7 +213,7 @@ int snac_upgrade(xs_str **error)
213 object_add_ow(id, o); 213 object_add_ow(id, o);
214 214
215 /* if it's from us, add to public */ 215 /* if it's from us, add to public */
216 if (xs_startswith(id, snac.actor)) { 216 if (is_msg_mine(&snac, id)) {
217 const xs_list *p; 217 const xs_list *p;
218 const char *v; 218 const char *v;
219 int c; 219 int c;