Pleroma.Web.TwitterAPI.ActivityView: Harden TwitterAPI against remnant of prismo
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Thu, 1 Nov 2018 14:07:27 +0000 (15:07 +0100)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Thu, 1 Nov 2018 14:07:27 +0000 (15:07 +0100)
lib/pleroma/web/twitter_api/views/activity_view.ex

index 8e8b3f5ed8417280c64af8c3b627605d45107948..83e8fb765b3d4a3cd1a735763b3cfd467258d372 100644 (file)
@@ -287,7 +287,7 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
     summary = object["name"] || object["summary"]
 
     content =
-      if !!summary and summary != "" do
+      if !!summary and summary != "" and is_bitstring(object["url"]) do
         "<p><a href=\"#{object["url"]}\">#{summary}</a></p>#{object["content"]}"
       else
         object["content"]