Просмотр исходного кода

Ensure the "quote" post attribute is an URL.

It seems that Bookwyrm generate "quote" fields for another thing,
because why not.
grunfink 8 месяцев назад
Родитель
Сommit
59d5a8b4a8
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      html.c

+ 1 - 1
html.c

@@ -2397,7 +2397,7 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
 
         /* quoted post */
         const char *quoted_id = xs_dict_get(msg, "quote");
-        if (xs_is_string(quoted_id)) {
+        if (xs_is_string(quoted_id) && xs_match(quoted_id, "https://*|http://*")) { /** **/
             xs *quoted_post = NULL;
 
             if (valid_status(object_get(quoted_id, &quoted_post))) {