From 13215f5f060a7c7da014aca79b6700654791856c Mon Sep 17 00:00:00 2001 From: Floatingghost Date: Sat, 26 Oct 2024 05:28:55 +0100 Subject: [PATCH] remove public key field --- lib/pleroma/object/fetcher.ex | 1 + lib/pleroma/signature.ex | 1 - lib/pleroma/user.ex | 3 --- lib/pleroma/user/signing_key.ex | 2 +- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/pleroma/object/fetcher.ex b/lib/pleroma/object/fetcher.ex index 897146bce..2cecfec67 100644 --- a/lib/pleroma/object/fetcher.ex +++ b/lib/pleroma/object/fetcher.ex @@ -343,6 +343,7 @@ defmodule Pleroma.Object.Fetcher do final_url end + @doc "Do NOT use; only public for use in tests" def get_object(id) do date = Pleroma.Signature.signed_date() diff --git a/lib/pleroma/signature.ex b/lib/pleroma/signature.ex index cedfee2e5..91e610fe1 100644 --- a/lib/pleroma/signature.ex +++ b/lib/pleroma/signature.ex @@ -11,7 +11,6 @@ defmodule Pleroma.Signature do require Logger def key_id_to_actor_id(key_id) do - # Given the key ID, first attempt to look it up in the signing keys table. case SigningKey.key_id_to_ap_id(key_id) do nil -> # hm, we SHOULD have gotten this in the pipeline before we hit here! diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index 05d3011cb..bf8717ffb 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -101,7 +101,6 @@ defmodule Pleroma.User do field(:password, :string, virtual: true) field(:password_confirmation, :string, virtual: true) field(:keys, :string) - field(:public_key, :string) field(:ap_id, :string) field(:avatar, :map, default: %{}) field(:local, :boolean, default: true) @@ -471,7 +470,6 @@ defmodule Pleroma.User do :inbox, :shared_inbox, :nickname, - :public_key, :avatar, :ap_enabled, :banner, @@ -532,7 +530,6 @@ defmodule Pleroma.User do :name, :emoji, :avatar, - :public_key, :inbox, :shared_inbox, :is_locked, diff --git a/lib/pleroma/user/signing_key.ex b/lib/pleroma/user/signing_key.ex index 11786bbb0..60f1edb7c 100644 --- a/lib/pleroma/user/signing_key.ex +++ b/lib/pleroma/user/signing_key.ex @@ -187,7 +187,7 @@ defmodule Pleroma.User.SigningKey do def fetch_remote_key(key_id) do Logger.debug("Fetching remote key: #{key_id}") # we should probably sign this, just in case - resp = Pleroma.Object.Fetcher.get_object(key_id) + resp = Pleroma.Object.Fetcher.fetch_and_contain_remote_object_from_id(key_id) case resp do {:ok, _original_url, body} ->