From 23049a077e8819fcae36cebd336adc5e25eff1e8 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Thu, 13 Feb 2020 19:53:39 +0300 Subject: NodeInfo: Fix federating status not being reported when MRF transparency is disabled Closes #1568 --- lib/pleroma/web/nodeinfo/nodeinfo_controller.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex b/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex index 03c35cc2a..333012920 100644 --- a/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex +++ b/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex @@ -46,10 +46,10 @@ defmodule Pleroma.Web.Nodeinfo.NodeinfoController do data |> Map.merge(%{quarantined_instances: quarantined}) - |> Map.put(:enabled, Config.get([:instance, :federating])) else %{} end + |> Map.put(:enabled, Config.get([:instance, :federating])) features = [ -- cgit v1.2.3 From 1257331291f27b55340a4ccca459a2673f3f37c2 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sat, 15 Feb 2020 00:35:46 +0100 Subject: MastodonAPI.StatusView: Do not use site_name site_name allow to spoof the origin of the domain and so hacks like: --- lib/pleroma/web/mastodon_api/views/status_view.ex | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex index e1e92034f..d4695c1c6 100644 --- a/lib/pleroma/web/mastodon_api/views/status_view.ex +++ b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -321,11 +321,9 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do nil end - site_name = rich_media[:site_name] || page_url_data.host - %{ type: "link", - provider_name: site_name, + provider_name: page_url_data.host, provider_url: page_url_data.scheme <> "://" <> page_url_data.host, url: page_url, image: image_url |> MediaProxy.url(), -- cgit v1.2.3