diff --git a/config/description.exs b/config/description.exs index d329f8afa..bd20cb239 100644 --- a/config/description.exs +++ b/config/description.exs @@ -3161,10 +3161,10 @@ children: frontend_options }, %{ - key: :pickable, - type: {:list, :string}, - description: - "A list containing all frontends users can pick as their preference, format is :name/:ref, e.g pleroma-fe/stable." + key: :pickable, + type: {:list, :string}, + description: + "A list containing all frontends users can pick as their preference, format is :name/:ref, e.g pleroma-fe/stable." } ] }, diff --git a/lib/mix/tasks/pleroma/diagnostics.ex b/lib/mix/tasks/pleroma/diagnostics.ex index 3b6063723..87be38b78 100644 --- a/lib/mix/tasks/pleroma/diagnostics.ex +++ b/lib/mix/tasks/pleroma/diagnostics.ex @@ -120,8 +120,8 @@ def run(["known_network", nickname]) do params ) |> limit(20) - + Ecto.Adapters.SQL.explain(Repo, :all, query, analyze: true, timeout: :infinity) - |> IO.puts() + |> IO.puts() end end diff --git a/lib/pleroma/web/activity_pub/activity_pub_controller.ex b/lib/pleroma/web/activity_pub/activity_pub_controller.ex index 5d7297c23..4e6842d85 100644 --- a/lib/pleroma/web/activity_pub/activity_pub_controller.ex +++ b/lib/pleroma/web/activity_pub/activity_pub_controller.ex @@ -8,7 +8,6 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do alias Pleroma.Activity alias Pleroma.Delivery alias Pleroma.Object - alias Pleroma.Object.Fetcher alias Pleroma.User alias Pleroma.Web.ActivityPub.ActivityPub alias Pleroma.Web.ActivityPub.InternalFetchActor diff --git a/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex b/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex index 4c5a36895..ea2d86f92 100644 --- a/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex +++ b/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex @@ -5,11 +5,6 @@ defmodule Pleroma.Web.Nodeinfo.NodeinfoController do use Pleroma.Web, :controller - alias Pleroma.Config - alias Pleroma.Stats - alias Pleroma.User - alias Pleroma.Web.Federator.Publisher - alias Pleroma.Web.MastodonAPI.InstanceView alias Pleroma.Web.Endpoint alias Pleroma.Web.Nodeinfo.Nodeinfo diff --git a/lib/pleroma/web/plugs/http_security_plug.ex b/lib/pleroma/web/plugs/http_security_plug.ex index 570aeefff..d7cff7343 100644 --- a/lib/pleroma/web/plugs/http_security_plug.ex +++ b/lib/pleroma/web/plugs/http_security_plug.ex @@ -117,11 +117,13 @@ defp csp_string(conn) do font_src = "font-src 'self'" script_src = "script-src 'self' '#{nonce_tag}' " - script_src = if @mix_env == :dev do - "script-src 'self' 'unsafe-eval' 'unsafe-inline'" - else - script_src - end + + script_src = + if @mix_env == :dev do + "script-src 'self' 'unsafe-eval' 'unsafe-inline'" + else + script_src + end report = if report_uri, do: ["report-uri ", report_uri, ";report-to csp-endpoint"] insecure = if scheme == "https", do: "upgrade-insecure-requests" diff --git a/test/pleroma/web/mastodon_api/controllers/timeline_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/timeline_controller_test.exs index fcc7a204e..eed12234f 100644 --- a/test/pleroma/web/mastodon_api/controllers/timeline_controller_test.exs +++ b/test/pleroma/web/mastodon_api/controllers/timeline_controller_test.exs @@ -423,10 +423,9 @@ test "should return 404 if disabled" do test "should not return 404 if local is specified" do clear_config([:instance, :federated_timeline_available], false) - result = - build_conn() - |> get("/api/v1/timelines/public?local=true") - |> json_response_and_validate_schema(200) + build_conn() + |> get("/api/v1/timelines/public?local=true") + |> json_response_and_validate_schema(200) end end