forked from AkkomaGang/akkoma
Merge branch 'develop' of https://akkoma.dev/AkkomaGang/akkoma into akko.wtf
This commit is contained in:
commit
7ce0445eea
5 changed files with 14 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
labels:
|
||||
platform: linux/aarch64
|
||||
platform: linux/arm64
|
||||
|
||||
depends_on:
|
||||
- test
|
||||
|
|
|
@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
|
|||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
## Unreleased
|
||||
|
||||
## 2025.01.01
|
||||
|
||||
Hotfix: Federation could break if a null value found its way into `should_federate?\1`
|
||||
|
||||
## 2025.01
|
||||
|
||||
## Added
|
||||
|
|
|
@ -112,7 +112,7 @@ defp allowed_instances do
|
|||
Config.get([:mrf_simple, :accept])
|
||||
end
|
||||
|
||||
def should_federate?(url) do
|
||||
def should_federate?(url) when is_binary(url) do
|
||||
%{host: host} = URI.parse(url)
|
||||
|
||||
with {nil, false} <- {nil, is_nil(host)},
|
||||
|
@ -137,6 +137,8 @@ def should_federate?(url) do
|
|||
end
|
||||
end
|
||||
|
||||
def should_federate?(_), do: false
|
||||
|
||||
@spec recipients(User.t(), Activity.t()) :: list(User.t()) | []
|
||||
defp recipients(actor, activity) do
|
||||
followers =
|
||||
|
|
2
mix.exs
2
mix.exs
|
@ -4,7 +4,7 @@ defmodule Pleroma.Mixfile do
|
|||
def project do
|
||||
[
|
||||
app: :pleroma,
|
||||
version: version("3.14.0"),
|
||||
version: version("3.14.1"),
|
||||
elixir: "~> 1.14",
|
||||
elixirc_paths: elixirc_paths(Mix.env()),
|
||||
compilers: Mix.compilers(),
|
||||
|
|
|
@ -519,6 +519,9 @@ test "publish to url with with different ports" do
|
|||
test "should not obliterate itself if the inbox URL is bad" do
|
||||
url = "/inbox"
|
||||
refute Pleroma.Web.ActivityPub.Publisher.should_federate?(url)
|
||||
|
||||
url = nil
|
||||
refute Pleroma.Web.ActivityPub.Publisher.should_federate?(url)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue