Do not hardcode path to the user used for signed fetches spoofing
This commit is contained in:
parent
77f28a4c91
commit
dceebaed41
2 changed files with 3 additions and 3 deletions
|
@ -370,7 +370,7 @@
|
|||
overwrite this with your internal.fetch key rippen from donor instance DB
|
||||
yes, just like that, newlines are important
|
||||
-----END RSA PRIVATE KEY-----",
|
||||
spoofed_instance: "https://funnydomain.example",
|
||||
spoofed_user: "https://funnydomain.example/internal/fetch",
|
||||
max_collection_objects: 50
|
||||
|
||||
config :pleroma, :streamer,
|
||||
|
|
|
@ -215,10 +215,10 @@ defp make_signature(id, date) do
|
|||
else
|
||||
""
|
||||
end
|
||||
spoofed_instance = Pleroma.Config.get([:activitypub, :spoofed_instance])
|
||||
spoofed_user = Pleroma.Config.get([:activitypub, :spoofed_user])
|
||||
|
||||
signature = if Pleroma.Config.get([:activitypub, :spoof_object_fetch_signatures]) do
|
||||
HTTPSignatures.sign(spoofed_key, spoofed_instance <> "/internal/fetch#main-key", %{
|
||||
HTTPSignatures.sign(spoofed_key, spoofed_user <> "#main-key", %{
|
||||
"(request-target)": "get #{uri.path}",
|
||||
host: uri.host,
|
||||
date: date
|
||||
|
|
Loading…
Reference in a new issue