diff options
author | default <nobody@localhost> | 2023-04-23 14:33:53 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2023-04-23 14:33:53 +0200 |
commit | 21fa6c7904bfd0e74b2251409f0c65d2c0aabe02 (patch) | |
tree | a4dbb640307df49ec252f63adfbe7987ec2fd33c /activitypub.c | |
parent | 6d07c2ba3166c933b9e727c0c5c30b69cda93644 (diff) |
Strip the query string in msg_follow().
Diffstat (limited to 'activitypub.c')
-rw-r--r-- | activitypub.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activitypub.c b/activitypub.c index 73225ac..b20ae0f 100644 --- a/activitypub.c +++ b/activitypub.c @@ -659,7 +659,7 @@ d_char *msg_delete(snac *snac, char *id) } -xs_dict *msg_follow(snac *snac, const char *url_or_uid) +xs_dict *msg_follow(snac *snac, const char *q) /* creates a 'Follow' message */ { xs *actor_o = NULL; @@ -667,6 +667,8 @@ xs_dict *msg_follow(snac *snac, const char *url_or_uid) d_char *msg = NULL; int status; + xs *url_or_uid = xs_strip_i(xs_str_new(q)); + if (xs_startswith(url_or_uid, "https:/")) actor = xs_dup(url_or_uid); else |