commit 59d5a8b

grunfink  ·  2025-11-09 09:03:48 +0000 UTC
parent c40cd66
Ensure the "quote" post attribute is an URL.

It seems that Bookwyrm generate "quote" fields for another thing,
because why not.
1 files changed,  +1, -1
M html.c
M html.c
+1, -1
1@@ -2397,7 +2397,7 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
2 
3         /* quoted post */
4         const char *quoted_id = xs_dict_get(msg, "quote");
5-        if (xs_is_string(quoted_id)) {
6+        if (xs_is_string(quoted_id) && xs_match(quoted_id, "https://*|http://*")) { /** **/
7             xs *quoted_post = NULL;
8 
9             if (valid_status(object_get(quoted_id, &quoted_post))) {