Quellcode durchsuchen

Ensure the "quote" post attribute is an URL.

It seems that Bookwyrm generate "quote" fields for another thing,
because why not.
grunfink vor 8 Monaten
Ursprung
Commit
59d5a8b4a8
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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))) {